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