1 # Copyright (c) 2019 IBM, Bell Canada
2 # Copyright (c) 2020 Samsung Electronics
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
29 app: {{ include "common.name" . }}
30 replicas: {{ .Values.replicaCount }}
34 # This allow a new pod to be ready before terminating the old one
35 # causing no downtime when replicas is set to 1
38 # maxSurge to 1 is very important for the hazelcast integration
39 # we only want one pod at a time to restart not multiple
40 # and break the hazelcast cluster. We should not use % maxSurge value
41 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
46 app: {{ include "common.name" . }}
47 release: {{ include "common.release" . }}
54 - "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"
56 - name: CDS_DB_USERNAME
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
58 - name: CDS_DB_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
60 - name: SDNC_DB_USERNAME
62 - name: SDNC_DB_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
65 - mountPath: /config-input/application.properties
66 name: {{ include "common.fullname" . }}-config
67 subPath: application.properties
69 name: processed-config
70 image: "{{ .Values.global.envsubstImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 name: {{ include "common.name" . }}-update-config
79 {{- if .Values.dmaapEnabled }}
88 fieldPath: metadata.namespace
89 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
90 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
91 name: {{ include "common.name" . }}-readiness
92 - name: fix-permission
97 - /opt/app/onap/blueprints/deploy
99 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 - mountPath: {{ .Values.persistence.deployedBlueprint }}
102 name: {{ include "common.fullname" . }}-blueprints
104 - name: {{ include "common.name" . }}
105 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
106 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 - name: APP_CONFIG_HOME
109 value: {{ .Values.config.appConfigDir }}
110 - name: USE_SCRIPT_COMPILE_CACHE
111 value: {{ .Values.config.useScriptCompileCache | quote }}
112 # Cluster should only be enabled when replicaCount is more than 2 and useScriptCompileCache is set to false otherwise it won't work properly
113 - name: CLUSTER_ENABLED
114 value: {{ if and (gt (int (.Values.replicaCount)) 2) (not .Values.config.useScriptCompileCache) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
116 value: {{ .Values.cluster.clusterName }}
117 - name: CLUSTER_NODE_ID
120 fieldPath: metadata.name
121 - name: CLUSTER_CONFIG_FILE
122 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
124 - containerPort: {{ .Values.service.http.internalPort }}
125 - containerPort: {{ .Values.service.grpc.internalPort }}
126 - containerPort: {{ .Values.service.cluster.internalPort }}
127 # disable liveness probe when breakpoints set in debugger
128 # so K8s doesn't restart unresponsive container
129 {{ if .Values.liveness.enabled }}
132 path: /api/v1/execution-service/health-check
133 port: {{ .Values.service.http.internalPort }}
135 - name: Authorization
136 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
137 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
138 periodSeconds: {{ .Values.liveness.periodSeconds }}
139 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
143 path: /api/v1/execution-service/health-check
144 port: {{ .Values.service.http.internalPort }}
146 - name: Authorization
147 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
148 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
149 periodSeconds: {{ .Values.readiness.periodSeconds }}
150 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
152 - mountPath: /etc/localtime
155 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
156 name: processed-config
157 subPath: application.properties
158 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
159 name: {{ include "common.fullname" . }}-config
160 subPath: error-messages_en.properties
161 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
162 name: {{ include "common.fullname" . }}-config
164 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
165 name: {{ include "common.fullname" . }}-config
166 subPath: hazelcast.yaml
168 - mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
169 name: {{ include "common.fullname" . }}-config
170 subPath: ONAP_RootCA.cer
172 - mountPath: {{ .Values.persistence.deployedBlueprint }}
173 name: {{ include "common.fullname" . }}-blueprints
175 {{ include "common.resources" . | indent 12 }}
176 {{- if .Values.nodeSelector }}
178 {{ toYaml .Values.nodeSelector | indent 10 }}
180 {{- if .Values.affinity }}
182 {{ toYaml .Values.affinity | indent 10 }}
188 - name: {{ include "common.fullname" . }}-config
190 name: {{ include "common.fullname" . }}-configmap
192 - key: application.properties
193 path: application.properties
194 - key: error-messages_en.properties
195 path: error-messages_en.properties
198 - key: hazelcast.yaml
200 - key: ONAP_RootCA.cer
201 path: ONAP_RootCA.cer
202 - name: {{ include "common.fullname" . }}-blueprints
203 persistentVolumeClaim:
204 claimName: {{ include "common.release" . }}-cds-blueprints
205 - name: processed-config
209 - name: "{{ include "common.namespace" . }}-docker-registry-key"