2 # Copyright (c) 2019 IBM, Bell Canada
3 # Copyright (c) 2020 Samsung Electronics
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 replicas: {{ .Values.replicaCount }}
36 # This allow a new pod to be ready before terminating the old one
37 # causing no downtime when replicas is set to 1
40 # maxSurge to 1 is very important for the hazelcast integration
41 # we only want one pod at a time to restart not multiple
42 # and break the hazelcast cluster. We should not use % maxSurge value
43 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
48 app: {{ include "common.name" . }}
49 release: {{ include "common.release" . }}
56 - "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"
58 - name: CDS_DB_USERNAME
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
60 - name: CDS_DB_PASSWORD
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
62 - name: SDNC_DB_USERNAME
64 - name: SDNC_DB_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
67 - mountPath: /config-input/application.properties
68 name: {{ include "common.fullname" . }}-config
69 subPath: application.properties
71 name: processed-config
72 image: {{ include "repositoryGenerator.image.envsubst" . }}
73 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 name: {{ include "common.name" . }}-update-config
81 {{- if .Values.dmaapEnabled }}
90 fieldPath: metadata.namespace
91 image: {{ include "repositoryGenerator.image.readiness" . }}
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 name: {{ include "common.name" . }}-readiness
94 - name: fix-permission
99 - /opt/app/onap/blueprints/deploy
100 image: {{ include "repositoryGenerator.image.busybox" . }}
101 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 - mountPath: {{ .Values.persistence.deployedBlueprint }}
104 name: {{ include "common.fullname" . }}-blueprints
106 - name: {{ include "common.name" . }}
107 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
108 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
110 - name: APP_CONFIG_HOME
111 value: {{ .Values.config.appConfigDir }}
112 - name: CLUSTER_ENABLED
113 value: {{ if (gt (int (.Values.replicaCount)) 2) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
115 value: {{ .Values.cluster.clusterName }}
116 - name: CLUSTER_NODE_ID
119 fieldPath: metadata.name
120 - name: CLUSTER_CONFIG_FILE
121 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
123 - containerPort: {{ .Values.service.http.internalPort }}
124 - containerPort: {{ .Values.service.grpc.internalPort }}
125 - containerPort: {{ .Values.service.cluster.internalPort }}
128 path: /api/v1/execution-service/health-check
129 port: {{ .Values.service.http.internalPort }}
131 - name: Authorization
132 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
133 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
134 failureThreshold: {{ .Values.startup.failureThreshold }}
135 periodSeconds: {{ .Values.startup.periodSeconds }}
136 # disable liveness probe when breakpoints set in debugger
137 # so K8s doesn't restart unresponsive container
138 {{ if .Values.liveness.enabled }}
141 path: /api/v1/execution-service/health-check
142 port: {{ .Values.service.http.internalPort }}
144 - name: Authorization
145 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
146 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
147 periodSeconds: {{ .Values.liveness.periodSeconds }}
148 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
152 path: /api/v1/execution-service/health-check
153 port: {{ .Values.service.http.internalPort }}
155 - name: Authorization
156 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
157 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
158 periodSeconds: {{ .Values.readiness.periodSeconds }}
159 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
161 - mountPath: /etc/localtime
164 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
165 name: processed-config
166 subPath: application.properties
167 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
168 name: {{ include "common.fullname" . }}-config
169 subPath: error-messages_en.properties
170 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
171 name: {{ include "common.fullname" . }}-config
173 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
174 name: {{ include "common.fullname" . }}-config
175 subPath: hazelcast.yaml
177 - mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
178 name: {{ include "common.fullname" . }}-config
179 subPath: ONAP_RootCA.cer
181 - mountPath: {{ .Values.persistence.deployedBlueprint }}
182 name: {{ include "common.fullname" . }}-blueprints
184 {{ include "common.resources" . | indent 12 }}
185 {{- if .Values.nodeSelector }}
187 {{ toYaml .Values.nodeSelector | indent 10 }}
189 {{- if .Values.affinity }}
191 {{ toYaml .Values.affinity | indent 10 }}
193 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
198 - name: {{ include "common.fullname" . }}-config
200 name: {{ include "common.fullname" . }}-configmap
202 - key: application.properties
203 path: application.properties
204 - key: error-messages_en.properties
205 path: error-messages_en.properties
208 - key: hazelcast.yaml
210 - key: ONAP_RootCA.cer
211 path: ONAP_RootCA.cer
212 - name: {{ include "common.fullname" . }}-blueprints
213 persistentVolumeClaim:
214 claimName: {{ include "common.release" . }}-cds-blueprints
215 - name: processed-config
219 - name: "{{ include "common.namespace" . }}-docker-registry-key"