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 | |
| 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" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [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" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 33 | spec: |
| 34 | initContainers: |
priyanshu | 617e90b | 2019-03-14 12:56:55 +0530 | [diff] [blame] | 35 | {{- if .Values.initJob.enabled }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 36 | - name: {{ include "common.name" . }}-job-completion |
| 37 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 38 | imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" |
| 39 | command: |
| 40 | - /root/job_complete.py |
| 41 | args: |
| 42 | - --job-name |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 43 | - {{ include "common.fullname" . }}-workflow-init |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 44 | env: |
| 45 | - name: NAMESPACE |
| 46 | valueFrom: |
| 47 | fieldRef: |
| 48 | apiVersion: v1 |
| 49 | fieldPath: metadata.namespace |
priyanshu | 9be6347 | 2019-03-13 14:43:36 +0530 | [diff] [blame] | 50 | {{ end }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 51 | containers: |
| 52 | - name: {{ include "common.name" . }} |
| 53 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 54 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 55 | ports: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 56 | - containerPort: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 57 | # disable liveness probe when breakpoints set in debugger |
| 58 | # so K8s doesn't restart unresponsive container |
| 59 | {{ if .Values.liveness.enabled }} |
| 60 | livenessProbe: |
| 61 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 62 | port: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 63 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 64 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 65 | {{ end }} |
| 66 | readinessProbe: |
| 67 | tcpSocket: |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 68 | port: {{ template "wfd-be.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 69 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 70 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 71 | env: |
| 72 | - name: JAVA_OPTIONS |
| 73 | value: {{ .Values.config.javaOptions }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 74 | - name: CS_HOSTS |
Mahendra Raghuwanshi | 35f83f5 | 2019-03-20 10:42:49 +0000 | [diff] [blame] | 75 | value: "{{ .Values.global.cassandra.serviceName }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 76 | - name: CS_PORT |
| 77 | value: "{{ .Values.config.cassandraClientPort }}" |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 78 | - name: CS_AUTHENTICATE |
| 79 | value: "{{ .Values.config.cassandraAuthenticationEnabled }}" |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 80 | - name: CS_USER |
| 81 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 82 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 83 | - name: CS_PASSWORD |
| 84 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 85 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password} |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 86 | - name: CS_SSL_ENABLED |
| 87 | value: "{{ .Values.config.cassandraSSLEnabled }}" |
| 88 | - name: CS_TRUST_STORE_PATH |
| 89 | value: "{{ .Values.config.cassandraTrustStorePath }}" |
| 90 | - name: CS_TRUST_STORE_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 91 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 92 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_truststore_password} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 93 | - name: SDC_PROTOCOL |
| 94 | value: "{{ .Values.config.sdcProtocol }}" |
| 95 | - name: SDC_ENDPOINT |
| 96 | value: "{{ .Values.config.sdcEndpoint }}" |
priyanshu | c00acbb | 2018-09-06 11:29:23 +0530 | [diff] [blame] | 97 | - name: SDC_USER |
| 98 | value: "{{ .Values.config.sdcExternalUser }}" |
| 99 | - name: SDC_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 100 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 101 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: wf_external_user_password} |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 102 | - name: SERVER_SSL_ENABLED |
| 103 | value: "{{ .Values.config.serverSSLEnabled }}" |
| 104 | - name: SERVER_SSL_KEYSTORE_TYPE |
priyanshu | 5698c83 | 2019-03-26 18:02:33 +0530 | [diff] [blame] | 105 | value: "{{ .Values.config.serverSSLKeyStoreType }}" |
priyanshu | bd7fbe2 | 2019-03-20 12:45:21 +0530 | [diff] [blame] | 106 | - name: SERVER_SSL_KEYSTORE_PATH |
| 107 | value: "{{ .Values.config.serverSSLKeyStorePath }}" |
| 108 | - name: SERVER_SSL_KEY_PASSWORD |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 109 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 110 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: keystore_password} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 111 | - name: SERVER_SSL_TRUSTSTORE_TYPE |
| 112 | value: "{{ .Values.config.serverSSLTrustStoreType }}" |
| 113 | - name: SERVER_SSL_TRUSTSTORE_PATH |
| 114 | value: "{{ .Values.config.serverSSLTrustStorePath }}" |
| 115 | - name: SERVER_SSL_TRUST_PASSWORD |
| 116 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 117 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: truststore_password} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 118 | imagePullSecrets: |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 119 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |