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.
16 apiVersion: extensions/v1beta1
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 }}
27 replicas: {{ .Values.replicaCount }}
31 # This allow a new pod to be ready before terminating the old one
32 # causing no downtime when replicas is set to 1
35 # maxSurge to 1 is very important for the hazelcast integration
36 # we only want one pod at a time to restart not multiple
37 # and break the hazelcast cluster. We should not use % maxSurge value
38 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
43 app: {{ include "common.name" . }}
44 release: {{ include "common.release" . }}
51 - "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"
53 - name: CDS_DB_USERNAME
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
55 - name: CDS_DB_PASSWORD
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
57 - name: SDNC_DB_USERNAME
59 - name: SDNC_DB_PASSWORD
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
62 - mountPath: /config-input/application.properties
63 name: {{ include "common.fullname" . }}-config
64 subPath: application.properties
66 name: processed-config
67 image: "{{ .Values.global.envsubstImage }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 name: {{ include "common.name" . }}-update-config
76 {{- if .Values.dmaapEnabled }}
85 fieldPath: metadata.namespace
86 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
87 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
88 name: {{ include "common.name" . }}-readiness
89 - name: fix-permission
94 - /opt/app/onap/blueprints/deploy
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 - mountPath: {{ .Values.persistence.deployedBlueprint }}
99 name: {{ include "common.fullname" . }}-blueprints
101 - name: {{ include "common.name" . }}
102 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
103 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
105 - name: APP_CONFIG_HOME
106 value: {{ .Values.config.appConfigDir }}
107 - name: USE_SCRIPT_COMPILE_CACHE
108 value: {{ .Values.config.useScriptCompileCache | quote }}
109 # Cluster should only be enabled when replicaCount is more than 2 and useScriptCompileCache is set to false otherwise it won't work properly
110 - name: CLUSTER_ENABLED
111 value: {{ if and (gt (int (.Values.replicaCount)) 2) (not .Values.config.useScriptCompileCache) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
113 value: {{ .Values.cluster.clusterName }}
114 - name: CLUSTER_NODE_ID
117 fieldPath: metadata.name
118 - name: CLUSTER_CONFIG_FILE
119 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
121 - containerPort: {{ .Values.service.http.internalPort }}
122 - containerPort: {{ .Values.service.grpc.internalPort }}
123 - containerPort: {{ .Values.service.cluster.internalPort }}
124 # disable liveness probe when breakpoints set in debugger
125 # so K8s doesn't restart unresponsive container
126 {{ if .Values.liveness.enabled }}
129 path: /api/v1/execution-service/health-check
130 port: {{ .Values.service.http.internalPort }}
132 - name: Authorization
133 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
134 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
135 periodSeconds: {{ .Values.liveness.periodSeconds }}
136 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
140 path: /api/v1/execution-service/health-check
141 port: {{ .Values.service.http.internalPort }}
143 - name: Authorization
144 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
145 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
146 periodSeconds: {{ .Values.readiness.periodSeconds }}
147 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
149 - mountPath: /etc/localtime
152 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
153 name: processed-config
154 subPath: application.properties
155 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
156 name: {{ include "common.fullname" . }}-config
157 subPath: error-messages_en.properties
158 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
159 name: {{ include "common.fullname" . }}-config
161 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
162 name: {{ include "common.fullname" . }}-config
163 subPath: hazelcast.yaml
165 - mountPath: {{ .Values.config.appConfigDir }}/ONAP_RootCA.cer
166 name: {{ include "common.fullname" . }}-config
167 subPath: ONAP_RootCA.cer
169 - mountPath: {{ .Values.persistence.deployedBlueprint }}
170 name: {{ include "common.fullname" . }}-blueprints
172 {{ include "common.resources" . | indent 12 }}
173 {{- if .Values.nodeSelector }}
175 {{ toYaml .Values.nodeSelector | indent 10 }}
177 {{- if .Values.affinity }}
179 {{ toYaml .Values.affinity | indent 10 }}
185 - name: {{ include "common.fullname" . }}-config
187 name: {{ include "common.fullname" . }}-configmap
189 - key: application.properties
190 path: application.properties
191 - key: error-messages_en.properties
192 path: error-messages_en.properties
195 - key: hazelcast.yaml
197 - key: ONAP_RootCA.cer
198 path: ONAP_RootCA.cer
199 - name: {{ include "common.fullname" . }}-blueprints
200 persistentVolumeClaim:
201 claimName: {{ include "common.release" . }}-cds-blueprints
202 - name: processed-config
206 - name: "{{ include "common.namespace" . }}-docker-registry-key"