2 # Copyright (c) 2019 IBM, Bell Canada
3 # Copyright (c) 2020 Samsung Electronics
4 # Modification Copyright © 2022-2023 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.
21 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
23 selector: {{- include "common.selectors" . | nindent 4 }}
24 replicas: {{ .Values.replicaCount }}
28 # This allows a new pod to be ready before terminating the old one
29 # causing no downtime when replicas is set to 1
31 # maxSurge to 1 is very important for the hazelcast integration
32 # we only want one pod at a time to restart not multiple
33 # and break the hazelcast cluster. We should not use % maxSurge value
34 # ref : https://hazelcast.com/blog/rolling-upgrade-hazelcast-imdg-on-kubernetes/
37 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
40 {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
45 - "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"
47 - name: CDS_DB_USERNAME
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
49 - name: CDS_DB_PASSWORD
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
51 - name: SDNC_DB_USERNAME
53 - name: SDNC_DB_PASSWORD
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
56 - mountPath: /config-input/application.properties
57 name: {{ include "common.fullname" . }}-config
58 subPath: application.properties
60 name: processed-config
61 image: {{ include "repositoryGenerator.image.envsubst" . }}
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 name: {{ include "common.name" . }}-update-config
69 - /opt/app/onap/blueprints/deploy
70 image: {{ include "repositoryGenerator.image.busybox" . }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
73 - mountPath: {{ .Values.persistence.deployedBlueprint }}
74 name: {{ include "common.fullname" . }}-blueprints
78 - name: {{ include "common.name" . }}
79 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
82 - name: APP_CONFIG_HOME
83 value: {{ .Values.config.appConfigDir }}
84 - name: CLUSTER_ENABLED
85 value: {{ if (gt (int (.Values.replicaCount)) 2) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
87 value: {{ .Values.cluster.clusterName }}
88 - name: CLUSTER_NODE_ID
91 fieldPath: metadata.name
92 - name: CLUSTER_CONFIG_FILE
93 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
95 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "login") | indent 12 }}
96 - name: CPS_PASS_PLAIN
97 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "password") | indent 12 }}
98 - name: SASL_JAAS_PASS
101 name: {{ include "common.name" . }}-ku
104 - containerPort: {{ .Values.service.http.internalPort }}
105 - containerPort: {{ .Values.service.grpc.internalPort }}
106 - containerPort: {{ .Values.service.cluster.internalPort }}
109 path: /api/v1/execution-service/health-check
110 port: {{ .Values.startup.port }}
112 - name: Authorization
113 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
114 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
115 failureThreshold: {{ .Values.startup.failureThreshold }}
116 periodSeconds: {{ .Values.startup.periodSeconds }}
117 # disable liveness probe when breakpoints set in debugger
118 # so K8s doesn't restart unresponsive container
119 {{ if .Values.liveness.enabled }}
122 path: /api/v1/execution-service/health-check
123 port: {{ .Values.liveness.port }}
125 - name: Authorization
126 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
127 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
128 periodSeconds: {{ .Values.liveness.periodSeconds }}
129 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
133 path: /api/v1/execution-service/health-check
134 port: {{ .Values.readiness.port }}
136 - name: Authorization
137 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
138 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
139 periodSeconds: {{ .Values.readiness.periodSeconds }}
140 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
142 - mountPath: /etc/localtime
145 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
146 name: processed-config
147 subPath: application.properties
148 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
149 name: {{ include "common.fullname" . }}-config
150 subPath: error-messages_en.properties
151 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
152 name: {{ include "common.fullname" . }}-config
154 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
155 name: {{ include "common.fullname" . }}-config
156 subPath: hazelcast.yaml
157 - mountPath: {{ .Values.persistence.deployedBlueprint }}
158 name: {{ include "common.fullname" . }}-blueprints
159 resources: {{ include "common.resources" . | nindent 12 }}
160 {{- if .Values.nodeSelector }}
162 {{ toYaml .Values.nodeSelector | indent 10 }}
164 {{- if .Values.affinity }}
166 {{ toYaml .Values.affinity | indent 10 }}
168 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
173 - name: {{ include "common.fullname" . }}-config
175 name: {{ include "common.fullname" . }}-configmap
177 - key: application.properties
178 path: application.properties
179 - key: error-messages_en.properties
180 path: error-messages_en.properties
183 - key: hazelcast.yaml
185 - name: {{ include "common.fullname" . }}-blueprints
186 persistentVolumeClaim:
187 claimName: {{ include "common.release" . }}-cds-blueprints
188 - name: processed-config
192 - name: "{{ include "common.namespace" . }}-docker-registry-key"