blob: 135b1f82074f87ff56b5b4feca3313455d8f6087 [file] [log] [blame]
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00001# Copyright © 2017 Amdocs, AT&T, Bell Canada
2# Modifications Copyright © 2018 ZTE
priyanshua1b061392018-05-29 12:50:14 +05303#
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
kwasiel59cc6a42020-07-23 10:02:49 +000016apiVersion: apps/v1
priyanshua1b061392018-05-29 12:50:14 +053017kind: Deployment
18metadata:
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 Opasiak137d7cc2020-01-24 23:49:11 +010024 release: {{ include "common.release" . }}
priyanshua1b061392018-05-29 12:50:14 +053025 heritage: {{ .Release.Service }}
26spec:
kwasiel59cc6a42020-07-23 10:02:49 +000027 selector:
28 matchLabels:
29 app: {{ include "common.name" . }}
priyanshua1b061392018-05-29 12:50:14 +053030 replicas: {{ .Values.replicaCount }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010035 release: {{ include "common.release" . }}
priyanshua1b061392018-05-29 12:50:14 +053036 spec:
37 initContainers:
priyanshu617e90b2019-03-14 12:56:55 +053038 {{- if .Values.initJob.enabled }}
priyanshua1b061392018-05-29 12:50:14 +053039 - 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
priyanshu3af9db62018-08-16 16:23:52 +053046 - {{ include "common.fullname" . }}-workflow-init
priyanshua1b061392018-05-29 12:50:14 +053047 env:
48 - name: NAMESPACE
49 valueFrom:
50 fieldRef:
51 apiVersion: v1
52 fieldPath: metadata.namespace
priyanshu9be63472019-03-13 14:43:36 +053053 {{ end }}
priyanshua1b061392018-05-29 12:50:14 +053054 containers:
55 - name: {{ include "common.name" . }}
56 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 ports:
IlanaPc80bff92019-11-18 21:10:08 +020059 - containerPort: {{ template "wfd-be.internalPort" . }}
priyanshua1b061392018-05-29 12:50:14 +053060 # 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:
IlanaPc80bff92019-11-18 21:10:08 +020065 port: {{ template "wfd-be.internalPort" . }}
priyanshua1b061392018-05-29 12:50:14 +053066 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
67 periodSeconds: {{ .Values.liveness.periodSeconds }}
68 {{ end }}
69 readinessProbe:
70 tcpSocket:
IlanaPc80bff92019-11-18 21:10:08 +020071 port: {{ template "wfd-be.internalPort" . }}
priyanshua1b061392018-05-29 12:50:14 +053072 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.readiness.periodSeconds }}
74 env:
75 - name: JAVA_OPTIONS
76 value: {{ .Values.config.javaOptions }}
priyanshu3af9db62018-08-16 16:23:52 +053077 - name: CS_HOSTS
Mahendra Raghuwanshi35f83f52019-03-20 10:42:49 +000078 value: "{{ .Values.global.cassandra.serviceName }}"
priyanshu3af9db62018-08-16 16:23:52 +053079 - name: CS_PORT
80 value: "{{ .Values.config.cassandraClientPort }}"
priyanshubd7fbe22019-03-20 12:45:21 +053081 - name: CS_AUTHENTICATE
82 value: "{{ .Values.config.cassandraAuthenticationEnabled }}"
priyanshu3af9db62018-08-16 16:23:52 +053083 - name: CS_USER
84 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010085 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user}
priyanshu3af9db62018-08-16 16:23:52 +053086 - name: CS_PASSWORD
87 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010088 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password}
priyanshubd7fbe22019-03-20 12:45:21 +053089 - 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
IlanaPc80bff92019-11-18 21:10:08 +020094 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010095 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_truststore_password}
priyanshu3af9db62018-08-16 16:23:52 +053096 - name: SDC_PROTOCOL
97 value: "{{ .Values.config.sdcProtocol }}"
98 - name: SDC_ENDPOINT
99 value: "{{ .Values.config.sdcEndpoint }}"
priyanshuc00acbb2018-09-06 11:29:23 +0530100 - name: SDC_USER
101 value: "{{ .Values.config.sdcExternalUser }}"
102 - name: SDC_PASSWORD
IlanaPc80bff92019-11-18 21:10:08 +0200103 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100104 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: wf_external_user_password}
priyanshubd7fbe22019-03-20 12:45:21 +0530105 - name: SERVER_SSL_ENABLED
106 value: "{{ .Values.config.serverSSLEnabled }}"
107 - name: SERVER_SSL_KEYSTORE_TYPE
priyanshu5698c832019-03-26 18:02:33 +0530108 value: "{{ .Values.config.serverSSLKeyStoreType }}"
priyanshubd7fbe22019-03-20 12:45:21 +0530109 - name: SERVER_SSL_KEYSTORE_PATH
110 value: "{{ .Values.config.serverSSLKeyStorePath }}"
111 - name: SERVER_SSL_KEY_PASSWORD
IlanaPc80bff92019-11-18 21:10:08 +0200112 valueFrom:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100113 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: keystore_password}
IlanaPc80bff92019-11-18 21:10:08 +0200114 - 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 Opasiak137d7cc2020-01-24 23:49:11 +0100120 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: truststore_password}
k.kedron2774ab12020-03-26 11:13:46 +0100121 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
priyanshua1b061392018-05-29 12:50:14 +0530132 imagePullSecrets:
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +0000133 - name: "{{ include "common.namespace" . }}-docker-registry-key"