Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
toshrajbhardwaj | 84d73b1 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Bell Canada |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ include "common.fullname" . }} |
| 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 24 | release: {{ .Release.Name }} |
| 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
vagrant | 62ddc7d | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 34 | initContainers: |
| 35 | - command: |
| 36 | - /root/ready.py |
| 37 | args: |
| 38 | - --container-name |
| 39 | - aai-resources |
sblimkie | a949bcb | 2018-04-20 10:50:48 -0400 | [diff] [blame] | 40 | - --container-name |
BorislavG | b20f0fc | 2018-05-08 15:18:57 +0000 | [diff] [blame] | 41 | - message-router-kafka |
vagrant | 62ddc7d | 2018-03-10 23:56:32 +0000 | [diff] [blame] | 42 | env: |
| 43 | - name: NAMESPACE |
| 44 | valueFrom: |
| 45 | fieldRef: |
| 46 | apiVersion: v1 |
| 47 | fieldPath: metadata.namespace |
| 48 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 50 | name: {{ include "common.name" . }}-readiness |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 51 | containers: |
| 52 | - name: {{ include "common.name" . }} |
BorislavG | 809b1d7 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 53 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 54 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 55 | ports: |
| 56 | - containerPort: {{ .Values.service.internalPort }} |
| 57 | # disable liveness probe when breakpoints set in debugger |
| 58 | # so K8s doesn't restart unresponsive container |
kj | 8bc9a7c | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 59 | {{ if .Values.liveness.enabled }} |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 60 | livenessProbe: |
| 61 | tcpSocket: |
| 62 | port: {{ .Values.service.internalPort }} |
| 63 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 64 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
kj | 8bc9a7c | 2018-03-28 18:10:32 +0300 | [diff] [blame] | 65 | {{ end }} |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 66 | readinessProbe: |
| 67 | tcpSocket: |
| 68 | port: {{ .Values.service.internalPort }} |
| 69 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 70 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 71 | env: |
| 72 | - name: CONFIG_HOME |
| 73 | value: "/opt/app/champ-service/appconfig" |
| 74 | - name: GRAPHIMPL |
| 75 | value: "janus-deps" |
Daniel Silverthorn | 3102326 | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 76 | - name: KEY_STORE_PASSWORD |
| 77 | valueFrom: |
| 78 | secretKeyRef: |
| 79 | name: {{ template "common.fullname" . }}-pass |
| 80 | key: KEY_STORE_PASSWORD |
| 81 | - name: KEY_MANAGER_PASSWORD |
| 82 | valueFrom: |
| 83 | secretKeyRef: |
| 84 | name: {{ template "common.fullname" . }}-pass |
| 85 | key: KEY_MANAGER_PASSWORD |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 86 | - name: SERVICE_BEANS |
| 87 | value: "/opt/app/champ-service/dynamic/conf" |
| 88 | volumeMounts: |
| 89 | - mountPath: /etc/localtime |
| 90 | name: localtime |
| 91 | readOnly: true |
| 92 | - mountPath: /opt/app/champ-service/appconfig/champ-api.properties |
| 93 | name: {{ include "common.fullname" . }}-config |
| 94 | subPath: champ-api.properties |
| 95 | - mountPath: /opt/app/champ-service/appconfig/auth |
| 96 | name: {{ include "common.fullname" . }}-secrets |
| 97 | - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml |
| 98 | name: {{ include "common.fullname" . }}-dynamic-config |
| 99 | subPath: champ-beans.xml |
Shwetank Dave | a1fe2fb | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 100 | - mountPath: /opt/app/champ-service/bundleconfig/etc/logback.xml |
| 101 | name: {{ include "common.fullname" . }}-logback-config |
| 102 | subPath: logback.xml |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 103 | - mountPath: /logs |
| 104 | name: {{ include "common.fullname" . }}-logs |
| 105 | resources: |
| 106 | {{ toYaml .Values.resources | indent 12 }} |
| 107 | {{- if .Values.nodeSelector }} |
| 108 | nodeSelector: |
| 109 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 110 | {{- end -}} |
| 111 | {{- if .Values.affinity }} |
| 112 | affinity: |
| 113 | {{ toYaml .Values.affinity | indent 10 }} |
| 114 | {{- end }} |
| 115 | |
| 116 | volumes: |
| 117 | - name: localtime |
| 118 | hostPath: |
| 119 | path: /etc/localtime |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 120 | - name: {{ include "common.fullname" . }}-config |
| 121 | configMap: |
Daniel Silverthorn | 3102326 | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 122 | name: {{ include "common.fullname" . }} |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 123 | items: |
| 124 | - key: champ-api.properties |
| 125 | path: champ-api.properties |
| 126 | - name: {{ include "common.fullname" . }}-secrets |
| 127 | secret: |
Daniel Silverthorn | 3102326 | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 128 | secretName: {{ include "common.fullname" . }}-champ |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 129 | - name: {{ include "common.fullname" . }}-dynamic-config |
| 130 | configMap: |
Daniel Silverthorn | 3102326 | 2018-03-28 19:18:19 +0000 | [diff] [blame] | 131 | name: {{ include "common.fullname" . }}-dynamic |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 132 | items: |
| 133 | - key: champ-beans.xml |
| 134 | path: champ-beans.xml |
| 135 | - name: {{ include "common.fullname" . }}-logs |
| 136 | emptyDir: {} |
Shwetank Dave | a1fe2fb | 2018-08-14 09:55:46 -0400 | [diff] [blame] | 137 | - name: {{ include "common.fullname" . }}-logback-config |
| 138 | configMap: |
| 139 | name: {{ include "common.fullname" . }}-log-configmap |
| 140 | items: |
| 141 | - key: logback.xml |
| 142 | path: logback.xml |
Daniel Silverthorn | b5d7ad8 | 2018-03-08 10:02:21 -0500 | [diff] [blame] | 143 | imagePullSecrets: |
| 144 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |