mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [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 "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 24 | release: {{ include "common.release" . }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 32 | release: {{ include "common.release" . }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 33 | spec: |
| 34 | initContainers: |
| 35 | - command: |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 36 | - sh |
| 37 | args: |
| 38 | - -c |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 39 | - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; chmod 0755 /config/${PFILE}; done" |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 40 | env: |
| 41 | - name: JDBC_USER |
| 42 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }} |
| 43 | - name: JDBC_PASSWORD |
| 44 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }} |
Dominik Mizyn | d1943c0 | 2020-04-16 10:41:01 +0200 | [diff] [blame] | 45 | - name: PDP_HTTP_USER_ID |
| 46 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "login") | indent 10 }} |
| 47 | - name: PDP_HTTP_PASSWORD |
| 48 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "password") | indent 10 }} |
| 49 | - name: PDP_PAP_PDP_HTTP_USER_ID |
| 50 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "login") | indent 10 }} |
| 51 | - name: PDP_PAP_PDP_HTTP_PASSWORD |
| 52 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "password") | indent 10 }} |
| 53 | - name: REPOSITORY_USERNAME |
| 54 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "login") | indent 10 }} |
| 55 | - name: REPOSITORY_PASSWORD |
| 56 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "password") | indent 10 }} |
| 57 | volumeMounts: |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 58 | - mountPath: /config-input/pe |
| 59 | name: pe-input |
| 60 | - mountPath: /config-input/pe-brmsgw |
| 61 | name: pe-brmsgw-input |
| 62 | - mountPath: /config/pe |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 63 | name: pe |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 64 | - mountPath: /config/pe-brmsgw |
| 65 | name: pe-brmsgw |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 66 | image: "{{ .Values.global.envsubstImage }}" |
| 67 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 68 | name: {{ include "common.name" . }}-update-config |
| 69 | - command: |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 70 | - /root/ready.py |
| 71 | args: |
| 72 | - --container-name |
| 73 | - {{ .Values.global.pap.nameOverride }} |
| 74 | env: |
| 75 | - name: NAMESPACE |
| 76 | valueFrom: |
| 77 | fieldRef: |
| 78 | apiVersion: v1 |
| 79 | fieldPath: metadata.namespace |
| 80 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 81 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 82 | name: {{ include "common.name" . }}-readiness |
| 83 | containers: |
| 84 | - command: |
| 85 | - /bin/bash |
| 86 | - ./do-start.sh |
| 87 | - brmsgw |
| 88 | name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 89 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 90 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Krzysztof Opasiak | 44088f9 | 2020-04-01 00:28:14 +0200 | [diff] [blame] | 91 | env: |
| 92 | - name: JDBC_USER |
| 93 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }} |
| 94 | - name: JDBC_PASSWORD |
| 95 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }} |
Dominik Mizyn | d1943c0 | 2020-04-16 10:41:01 +0200 | [diff] [blame] | 96 | - name: PDP_HTTP_USER_ID |
| 97 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "login") | indent 10 }} |
| 98 | - name: PDP_HTTP_PASSWORD |
| 99 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "password") | indent 10 }} |
| 100 | - name: PDP_PAP_PDP_HTTP_USER_ID |
| 101 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "login") | indent 10 }} |
| 102 | - name: PDP_PAP_PDP_HTTP_PASSWORD |
| 103 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "password") | indent 10 }} |
| 104 | - name: REPOSITORY_USERNAME |
| 105 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "login") | indent 10 }} |
| 106 | - name: REPOSITORY_PASSWORD |
| 107 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "password") | indent 10 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 108 | ports: |
| 109 | - containerPort: {{ .Values.service.externalPort }} |
| 110 | {{- if eq .Values.liveness.enabled true }} |
| 111 | livenessProbe: |
| 112 | tcpSocket: |
| 113 | port: {{ .Values.service.externalPort }} |
| 114 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 115 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 116 | {{- end }} |
| 117 | readinessProbe: |
| 118 | tcpSocket: |
| 119 | port: {{ .Values.service.externalPort }} |
| 120 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 121 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 122 | volumeMounts: |
| 123 | - mountPath: /etc/localtime |
| 124 | name: localtime |
| 125 | readOnly: true |
mayankg2703 | 583b43e | 2018-04-17 05:10:56 +0000 | [diff] [blame] | 126 | - mountPath: /tmp/policy-install/config/brmsgw-tweaks.sh |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 127 | name: pe-brmsgw |
mayankg2703 | 583b43e | 2018-04-17 05:10:56 +0000 | [diff] [blame] | 128 | subPath: brmsgw-tweaks.sh |
| 129 | - mountPath: /tmp/policy-install/config/brmsgw.conf |
| 130 | name: pe-brmsgw |
| 131 | subPath: brmsgw.conf |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 132 | - mountPath: /tmp/policy-install/config/base.conf |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 133 | name: pe |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 134 | subPath: base.conf |
| 135 | - mountPath: /tmp/policy-install/do-start.sh |
| 136 | name: pe-scripts |
| 137 | subPath: do-start.sh |
| 138 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 139 | {{ include "common.resources" . | indent 12 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 140 | {{- if .Values.nodeSelector }} |
| 141 | nodeSelector: |
| 142 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 143 | {{- end -}} |
| 144 | {{- if .Values.affinity }} |
| 145 | affinity: |
| 146 | {{ toYaml .Values.affinity | indent 10 }} |
| 147 | {{- end }} |
| 148 | volumes: |
| 149 | - name: localtime |
| 150 | hostPath: |
| 151 | path: /etc/localtime |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 152 | - name: pe-input |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 153 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 154 | name: {{ include "common.release" . }}-pe-configmap |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 155 | defaultMode: 0755 |
| 156 | - name: pe-scripts |
| 157 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 158 | name: {{ include "common.release" . }}-pe-scripts-configmap |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 159 | defaultMode: 0777 |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 160 | - name: pe-brmsgw-input |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 161 | configMap: |
| 162 | name: {{ include "common.fullname" . }}-pe-configmap |
| 163 | defaultMode: 0755 |
jhh | 0ee08c0 | 2020-04-27 17:12:43 -0500 | [diff] [blame^] | 164 | - name: pe |
| 165 | emptyDir: |
| 166 | medium: Memory |
| 167 | - name: pe-brmsgw |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 168 | emptyDir: |
| 169 | medium: Memory |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 170 | imagePullSecrets: |
| 171 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |