toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
| 2 | # Modifications Copyright © 2018 ZTE |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [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 | |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 16 | apiVersion: apps/v1 |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 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" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
kwasiel | 59cc6a4 | 2020-07-23 10:02:49 +0000 | [diff] [blame] | 27 | selector: |
| 28 | matchLabels: |
| 29 | app: {{ include "common.name" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 30 | replicas: {{ .Values.replicaCount }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 35 | release: {{ include "common.release" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 36 | spec: |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 37 | initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }} |
priyanshu | 617e90b | 2019-03-14 12:56:55 +0530 | [diff] [blame] | 38 | {{- if .Values.initJob.enabled }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 39 | - name: {{ include "common.name" . }}-job-completion |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 40 | image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 41 | imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" |
| 42 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 43 | - /app/ready.py |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 44 | args: |
| 45 | - --job-name |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 46 | - {{ include "common.fullname" . }}-workflow-init |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 47 | env: |
| 48 | - name: NAMESPACE |
| 49 | valueFrom: |
| 50 | fieldRef: |
| 51 | apiVersion: v1 |
| 52 | fieldPath: metadata.namespace |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 53 | resources: |
| 54 | limits: |
| 55 | cpu: 100m |
| 56 | memory: 100Mi |
| 57 | requests: |
| 58 | cpu: 3m |
| 59 | memory: 20Mi |
priyanshu | 9be6347 | 2019-03-13 14:43:36 +0530 | [diff] [blame] | 60 | {{ end }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 61 | containers: |
| 62 | - name: {{ include "common.name" . }} |
| 63 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 64 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 65 | {{- if .Values.global.aafEnabled }} |
| 66 | command: |
| 67 | - sh |
| 68 | args: |
| 69 | - "-c" |
| 70 | - | |
| 71 | export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0) |
| 72 | export SERVER_SSL_KEY_PASSWORD=$cadi_keystore_password_p12 |
| 73 | export KEYMANAGER_PASS=$cadi_keystore_password_p12 |
| 74 | export SERVER_SSL_TRUST_PASSWORD=$cadi_truststore_password |
| 75 | export SERVER_SSL_KEYSTORE_PATH={{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} |
| 76 | export SERVER_SSL_TRUSTSTORE_PATH={{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} |
| 77 | ./startup.sh |
| 78 | {{- end }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 79 | ports: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 80 | - containerPort: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 81 | # disable liveness probe when breakpoints set in debugger |
| 82 | # so K8s doesn't restart unresponsive container |
| 83 | {{ if .Values.liveness.enabled }} |
| 84 | livenessProbe: |
| 85 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 86 | port: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 87 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 88 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 89 | {{ end }} |
| 90 | readinessProbe: |
| 91 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 92 | port: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 93 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 94 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 95 | env: |
| 96 | - name: JAVA_OPTIONS |
| 97 | value: {{ .Values.config.javaOptions }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 98 | - name: CS_HOSTS |
Mahendra Raghuwanshi | 35f83f5 | 2019-03-20 10:42:49 +0000 | [diff] [blame] | 99 | value: "{{ .Values.global.cassandra.serviceName }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 100 | - name: CS_PORT |
| 101 | value: "{{ .Values.config.cassandraClientPort }}" |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 102 | - name: CS_AUTHENTICATE |
| 103 | value: "{{ .Values.config.cassandraAuthenticationEnabled }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 104 | - name: CS_USER |
| 105 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 106 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 107 | - name: CS_PASSWORD |
| 108 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 109 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password} |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 110 | - name: CS_SSL_ENABLED |
| 111 | value: "{{ .Values.config.cassandraSSLEnabled }}" |
| 112 | - name: CS_TRUST_STORE_PATH |
| 113 | value: "{{ .Values.config.cassandraTrustStorePath }}" |
| 114 | - name: CS_TRUST_STORE_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 115 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 116 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_truststore_password} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 117 | - name: SDC_PROTOCOL |
| 118 | value: "{{ .Values.config.sdcProtocol }}" |
| 119 | - name: SDC_ENDPOINT |
| 120 | value: "{{ .Values.config.sdcEndpoint }}" |
priyanshu | c00acbb | 2018-09-06 11:29:23 +0530 | [diff] [blame] | 121 | - name: SDC_USER |
| 122 | value: "{{ .Values.config.sdcExternalUser }}" |
| 123 | - name: SDC_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 124 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 125 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: wf_external_user_password} |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 126 | - name: SERVER_SSL_ENABLED |
| 127 | value: "{{ .Values.config.serverSSLEnabled }}" |
| 128 | - name: SERVER_SSL_KEYSTORE_TYPE |
priyanshu | 5698c83 | 2019-03-26 18:02:33 +0530 | [diff] [blame] | 129 | value: "{{ .Values.config.serverSSLKeyStoreType }}" |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 130 | - name: SERVER_SSL_TRUSTSTORE_TYPE |
| 131 | value: "{{ .Values.config.serverSSLTrustStoreType }}" |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 132 | volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }} |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 133 | resources: {{ include "common.resources" . | nindent 12 }} |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 134 | volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 135 | imagePullSecrets: |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 136 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |