kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
| 27 | selector: |
| 28 | matchLabels: |
| 29 | app: {{ include "common.name" . }} |
| 30 | template: |
| 31 | metadata: |
| 32 | labels: |
| 33 | app: {{ include "common.name" . }} |
| 34 | release: {{ .Release.Name }} |
| 35 | name: {{ include "common.name" . }} |
| 36 | spec: |
| 37 | initContainers: |
| 38 | - command: |
| 39 | - /bin/sh |
| 40 | - -c |
| 41 | - | |
| 42 | mkdir -p /logroot/data-router/logs |
| 43 | chmod -R 777 /logroot/data-router/logs |
| 44 | chown -R root:root /logroot |
| 45 | env: |
| 46 | - name: NAMESPACE |
| 47 | valueFrom: |
| 48 | fieldRef: |
| 49 | apiVersion: v1 |
| 50 | fieldPath: metadata.namespace |
| 51 | securityContext: |
| 52 | privileged: true |
| 53 | image: {{ .Values.global.dockerhubRepository | default .Values.dockerhubRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }} |
| 54 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 55 | name: init-sysctl |
| 56 | volumeMounts: |
| 57 | - name: {{ include "common.fullname" . }}-logs |
| 58 | mountPath: /logroot/ |
| 59 | containers: |
| 60 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 61 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 62 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 63 | env: |
| 64 | - name: SERVICE_BEANS |
| 65 | value: /opt/app/data-router/dynamic/conf |
| 66 | - name: CONFIG_HOME |
| 67 | value: /opt/app/data-router/config/ |
| 68 | - name: KEY_STORE_PASSWORD |
| 69 | value: {{ .Values.config.keyStorePassword }} |
| 70 | - name: DYNAMIC_ROUTES |
| 71 | value: /opt/app/data-router/dynamic/routes |
| 72 | - name: KEY_MANAGER_PASSWORD |
| 73 | value: {{ .Values.config.keyManagerPassword }} |
| 74 | - name: PATH |
| 75 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| 76 | - name: JAVA_HOME |
| 77 | value: usr/lib/jvm/java-8-openjdk-amd64 |
| 78 | volumeMounts: |
| 79 | - mountPath: /etc/localtime |
| 80 | name: localtime |
| 81 | readOnly: true |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 82 | - mountPath: /opt/app/data-router/config/auth |
| 83 | name: {{ include "common.fullname" . }}-auth |
| 84 | - mountPath: /opt/app/data-router/config/data-router.properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 85 | subPath: data-router.properties |
Michael Arrastia | e610648 | 2018-06-15 16:30:04 +0100 | [diff] [blame^] | 86 | name: {{ include "common.fullname" . }}-properties |
| 87 | - mountPath: /opt/app/data-router/config/schemaIngest.properties |
| 88 | subPath: schemaIngest.properties |
| 89 | name: {{ include "common.fullname" . }}-properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 90 | - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route |
| 91 | subPath: entity-event.route |
| 92 | name: {{ include "common.fullname" . }}-dynamic-route |
| 93 | - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml |
| 94 | subPath: entity-event-policy.xml |
| 95 | name: {{ include "common.fullname" . }}-dynamic-policy |
| 96 | - mountPath: /logs/ |
| 97 | name: {{ include "common.fullname" . }}-logs |
| 98 | ports: |
| 99 | - containerPort: {{ .Values.service.internalPort }} |
| 100 | {{- if eq .Values.liveness.enabled true }} |
| 101 | livenessProbe: |
| 102 | tcpSocket: |
| 103 | port: {{ .Values.service.internalPort }} |
| 104 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 105 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 106 | {{ end -}} |
| 107 | readinessProbe: |
| 108 | tcpSocket: |
| 109 | port: {{ .Values.service.internalPort }} |
| 110 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 111 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 112 | volumes: |
| 113 | - name: localtime |
| 114 | hostPath: |
| 115 | path: /etc/localtime |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 116 | - name: {{ include "common.fullname" . }}-auth |
| 117 | secret: |
| 118 | secretName: {{ include "common.fullname" . }} |
| 119 | - name: {{ include "common.fullname" . }}-properties |
| 120 | configMap: |
| 121 | name: {{ include "common.fullname" . }}-prop |
Michael Arrastia | e610648 | 2018-06-15 16:30:04 +0100 | [diff] [blame^] | 122 | items: |
| 123 | - key: data-router.properties |
| 124 | path: data-router.properties |
| 125 | - key: schemaIngest.properties |
| 126 | path: schemaIngest.properties |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 127 | - name: {{ include "common.fullname" . }}-dynamic-route |
| 128 | configMap: |
| 129 | name: {{ include "common.fullname" . }}-dynamic |
| 130 | - name: {{ include "common.fullname" . }}-dynamic-policy |
| 131 | configMap: |
| 132 | name: {{ include "common.fullname" . }}-dynamic |
| 133 | - name: {{ include "common.fullname" . }}-logs |
| 134 | hostPath: |
BorislavG | 56857c4 | 2018-05-03 14:29:51 +0000 | [diff] [blame] | 135 | path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} |
kj | 9bf2731 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 136 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
| 137 | imagePullSecrets: |
| 138 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |