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 |
| 39 | - "cd /config-input && for PFILE in `ls -1 *.conf`; do envsubst <${PFILE} >/config/${PFILE}; done" |
| 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: |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 58 | volumeMounts: |
| 59 | - mountPath: /config-input |
| 60 | name: pe |
| 61 | - mountPath: /config |
| 62 | name: pe-processed |
| 63 | image: "{{ .Values.global.envsubstImage }}" |
| 64 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 65 | name: {{ include "common.name" . }}-update-config |
| 66 | - command: |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 67 | - /root/ready.py |
| 68 | args: |
| 69 | - --container-name |
| 70 | - {{ .Values.global.pap.nameOverride }} |
| 71 | env: |
| 72 | - name: NAMESPACE |
| 73 | valueFrom: |
| 74 | fieldRef: |
| 75 | apiVersion: v1 |
| 76 | fieldPath: metadata.namespace |
| 77 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 78 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 79 | name: {{ include "common.name" . }}-readiness |
| 80 | containers: |
| 81 | - command: |
| 82 | - /bin/bash |
| 83 | - ./do-start.sh |
| 84 | - brmsgw |
| 85 | name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 86 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 87 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Krzysztof Opasiak | 44088f9 | 2020-04-01 00:28:14 +0200 | [diff] [blame] | 88 | env: |
| 89 | - name: JDBC_USER |
| 90 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }} |
| 91 | - name: JDBC_PASSWORD |
| 92 | {{- 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^] | 93 | - name: PDP_HTTP_USER_ID |
| 94 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "login") | indent 10 }} |
| 95 | - name: PDP_HTTP_PASSWORD |
| 96 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pdp-http-creds" "key" "password") | indent 10 }} |
| 97 | - name: PDP_PAP_PDP_HTTP_USER_ID |
| 98 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "login") | indent 10 }} |
| 99 | - name: PDP_PAP_PDP_HTTP_PASSWORD |
| 100 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pap-http-creds" "key" "password") | indent 10 }} |
| 101 | - name: REPOSITORY_USERNAME |
| 102 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "login") | indent 10 }} |
| 103 | - name: REPOSITORY_PASSWORD |
| 104 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nexus-creds" "key" "password") | indent 10 }} |
| 105 | volumeMounts: |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 106 | ports: |
| 107 | - containerPort: {{ .Values.service.externalPort }} |
| 108 | {{- if eq .Values.liveness.enabled true }} |
| 109 | livenessProbe: |
| 110 | tcpSocket: |
| 111 | port: {{ .Values.service.externalPort }} |
| 112 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 113 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 114 | {{- end }} |
| 115 | readinessProbe: |
| 116 | tcpSocket: |
| 117 | port: {{ .Values.service.externalPort }} |
| 118 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 119 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 120 | volumeMounts: |
| 121 | - mountPath: /etc/localtime |
| 122 | name: localtime |
| 123 | readOnly: true |
mayankg2703 | 583b43e | 2018-04-17 05:10:56 +0000 | [diff] [blame] | 124 | - mountPath: /tmp/policy-install/config/brmsgw-tweaks.sh |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 125 | name: pe-brmsgw |
mayankg2703 | 583b43e | 2018-04-17 05:10:56 +0000 | [diff] [blame] | 126 | subPath: brmsgw-tweaks.sh |
| 127 | - mountPath: /tmp/policy-install/config/brmsgw.conf |
| 128 | name: pe-brmsgw |
| 129 | subPath: brmsgw.conf |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 130 | - mountPath: /tmp/policy-install/config/base.conf |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 131 | name: pe-processed |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 132 | subPath: base.conf |
| 133 | - mountPath: /tmp/policy-install/do-start.sh |
| 134 | name: pe-scripts |
| 135 | subPath: do-start.sh |
| 136 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 137 | {{ include "common.resources" . | indent 12 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 138 | {{- if .Values.nodeSelector }} |
| 139 | nodeSelector: |
| 140 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 141 | {{- end -}} |
| 142 | {{- if .Values.affinity }} |
| 143 | affinity: |
| 144 | {{ toYaml .Values.affinity | indent 10 }} |
| 145 | {{- end }} |
| 146 | volumes: |
| 147 | - name: localtime |
| 148 | hostPath: |
| 149 | path: /etc/localtime |
| 150 | - name: pe |
| 151 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 152 | name: {{ include "common.release" . }}-pe-configmap |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 153 | defaultMode: 0755 |
| 154 | - name: pe-scripts |
| 155 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 156 | name: {{ include "common.release" . }}-pe-scripts-configmap |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 157 | defaultMode: 0777 |
| 158 | - name: pe-brmsgw |
| 159 | configMap: |
| 160 | name: {{ include "common.fullname" . }}-pe-configmap |
| 161 | defaultMode: 0755 |
Krzysztof Opasiak | 98a79cc | 2020-04-01 22:33:58 +0200 | [diff] [blame] | 162 | - name: pe-processed |
| 163 | emptyDir: |
| 164 | medium: Memory |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 165 | imagePullSecrets: |
| 166 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |