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