2 # Copyright (c) 2019 IBM, Bell Canada
3 # Copyright (c) 2020 Samsung Electronics
4 # Modification Copyright © 2022 Nordix Foundation
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
37 # This allow a new pod to be ready before terminating the old one
38 # causing no downtime when replicas is set to 1
41 # maxSurge to 1 is very important for the hazelcast integration
42 # we only want one pod at a time to restart not multiple
43 # and break the hazelcast cluster. We should not use % maxSurge value
44 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
49 app: {{ include "common.name" . }}
50 release: {{ include "common.release" . }}
52 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
57 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst '${CDS_DB_USERNAME},${CDS_DB_PASSWORD},${SDNC_DB_USERNAME},${SDNC_DB_PASSWORD}' <${PFILE} >/config/${PFILE}; done"
59 - name: CDS_DB_USERNAME
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
61 - name: CDS_DB_PASSWORD
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
63 - name: SDNC_DB_USERNAME
65 - name: SDNC_DB_PASSWORD
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
68 - mountPath: /config-input/application.properties
69 name: {{ include "common.fullname" . }}-config
70 subPath: application.properties
72 name: processed-config
73 image: {{ include "repositoryGenerator.image.envsubst" . }}
74 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
75 name: {{ include "common.name" . }}-update-config
87 fieldPath: metadata.namespace
88 image: {{ include "repositoryGenerator.image.readiness" . }}
89 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
90 name: {{ include "common.name" . }}-readiness
91 - name: fix-permission
96 - /opt/app/onap/blueprints/deploy
97 image: {{ include "repositoryGenerator.image.busybox" . }}
98 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
100 - mountPath: {{ .Values.persistence.deployedBlueprint }}
101 name: {{ include "common.fullname" . }}-blueprints
103 - name: {{ include "common.name" . }}
104 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
107 - name: APP_CONFIG_HOME
108 value: {{ .Values.config.appConfigDir }}
109 - name: CLUSTER_ENABLED
110 value: {{ if (gt (int (.Values.replicaCount)) 2) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
112 value: {{ .Values.cluster.clusterName }}
113 - name: AAF_CREDSPATH
114 value: {{ .Values.certInitializer.credsPath }}
115 - name: CLUSTER_NODE_ID
118 fieldPath: metadata.name
119 - name: CLUSTER_CONFIG_FILE
120 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
122 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "login") | indent 12 }}
123 - name: CPS_PASS_PLAIN
124 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "password") | indent 12 }}
125 {{ if .Values.useStrimziKafka }}
127 value: {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-kafka-secret" "key" "password") | indent 12 }}
130 - containerPort: {{ .Values.service.http.internalPort }}
131 - containerPort: {{ .Values.service.grpc.internalPort }}
132 - containerPort: {{ .Values.service.cluster.internalPort }}
135 path: /api/v1/execution-service/health-check
136 port: {{ .Values.service.http.internalPort }}
138 - name: Authorization
139 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
140 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
141 failureThreshold: {{ .Values.startup.failureThreshold }}
142 periodSeconds: {{ .Values.startup.periodSeconds }}
143 # disable liveness probe when breakpoints set in debugger
144 # so K8s doesn't restart unresponsive container
145 {{ if .Values.liveness.enabled }}
148 path: /api/v1/execution-service/health-check
149 port: {{ .Values.service.http.internalPort }}
151 - name: Authorization
152 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
153 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
154 periodSeconds: {{ .Values.liveness.periodSeconds }}
155 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
159 path: /api/v1/execution-service/health-check
160 port: {{ .Values.service.http.internalPort }}
162 - name: Authorization
163 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
164 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
165 periodSeconds: {{ .Values.readiness.periodSeconds }}
166 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
167 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
168 - mountPath: /etc/localtime
171 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
172 name: processed-config
173 subPath: application.properties
174 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
175 name: {{ include "common.fullname" . }}-config
176 subPath: error-messages_en.properties
177 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
178 name: {{ include "common.fullname" . }}-config
180 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
181 name: {{ include "common.fullname" . }}-config
182 subPath: hazelcast.yaml
184 - mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
185 name: {{ include "common.fullname" . }}-config
186 subPath: ONAP_RootCA.cer
188 - mountPath: {{ .Values.persistence.deployedBlueprint }}
189 name: {{ include "common.fullname" . }}-blueprints
190 resources: {{ include "common.resources" . | nindent 12 }}
191 {{- if .Values.nodeSelector }}
193 {{ toYaml .Values.nodeSelector | indent 10 }}
195 {{- if .Values.affinity }}
197 {{ toYaml .Values.affinity | indent 10 }}
199 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
200 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
204 - name: {{ include "common.fullname" . }}-config
206 name: {{ include "common.fullname" . }}-configmap
208 - key: application.properties
209 path: application.properties
210 - key: error-messages_en.properties
211 path: error-messages_en.properties
214 - key: hazelcast.yaml
216 - key: ONAP_RootCA.cer
217 path: ONAP_RootCA.cer
218 - name: {{ include "common.fullname" . }}-blueprints
219 persistentVolumeClaim:
220 claimName: {{ include "common.release" . }}-cds-blueprints
221 - name: processed-config
225 - name: "{{ include "common.namespace" . }}-docker-registry-key"