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 }}
39 initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
44 - "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"
46 - name: CDS_DB_USERNAME
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "login") | indent 10}}
48 - name: CDS_DB_PASSWORD
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-db-user-creds" "key" "password") | indent 10}}
50 - name: SDNC_DB_USERNAME
52 - name: SDNC_DB_PASSWORD
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-db-root-pass" "key" "password") | indent 10}}
55 - mountPath: /config-input/application.properties
56 name: {{ include "common.fullname" . }}-config
57 subPath: application.properties
59 name: processed-config
60 image: {{ include "repositoryGenerator.image.envsubst" . }}
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 name: {{ include "common.name" . }}-update-config
68 - /opt/app/onap/blueprints/deploy
69 image: {{ include "repositoryGenerator.image.busybox" . }}
70 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 - mountPath: {{ .Values.persistence.deployedBlueprint }}
73 name: {{ include "common.fullname" . }}-blueprints
77 - name: {{ include "common.name" . }}
78 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 - name: APP_CONFIG_HOME
82 value: {{ .Values.config.appConfigDir }}
83 - name: CLUSTER_ENABLED
84 value: {{ if (gt (int (.Values.replicaCount)) 2) }} {{ .Values.cluster.enabled | quote }} {{ else }} "false" {{ end }}
86 value: {{ .Values.cluster.clusterName }}
87 - name: CLUSTER_NODE_ID
90 fieldPath: metadata.name
91 - name: CLUSTER_CONFIG_FILE
92 value: {{ .Values.config.appConfigDir }}/hazelcast.yaml
94 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "login") | indent 12 }}
95 - name: CPS_PASS_PLAIN
96 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "password") | indent 12 }}
97 - name: SASL_JAAS_PASS
100 name: {{ include "common.name" . }}-ku
103 - containerPort: {{ .Values.service.http.internalPort }}
104 - containerPort: {{ .Values.service.grpc.internalPort }}
105 - containerPort: {{ .Values.service.cluster.internalPort }}
108 path: /api/v1/execution-service/health-check
109 port: {{ .Values.startup.port }}
111 - name: Authorization
112 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
113 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
114 failureThreshold: {{ .Values.startup.failureThreshold }}
115 periodSeconds: {{ .Values.startup.periodSeconds }}
116 # disable liveness probe when breakpoints set in debugger
117 # so K8s doesn't restart unresponsive container
118 {{ if .Values.liveness.enabled }}
121 path: /api/v1/execution-service/health-check
122 port: {{ .Values.liveness.port }}
124 - name: Authorization
125 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
126 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
127 periodSeconds: {{ .Values.liveness.periodSeconds }}
128 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
132 path: /api/v1/execution-service/health-check
133 port: {{ .Values.readiness.port }}
135 - name: Authorization
136 value: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
137 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
138 periodSeconds: {{ .Values.readiness.periodSeconds }}
139 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
141 - mountPath: {{ .Values.config.appConfigDir }}/application.properties
142 name: processed-config
143 subPath: application.properties
144 - mountPath: {{ .Values.config.appConfigDir }}/error-messages_en.properties
145 name: {{ include "common.fullname" . }}-config
146 subPath: error-messages_en.properties
147 - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
148 name: {{ include "common.fullname" . }}-config
150 - mountPath: {{ .Values.config.appConfigDir }}/hazelcast.yaml
151 name: {{ include "common.fullname" . }}-config
152 subPath: hazelcast.yaml
153 - mountPath: {{ .Values.persistence.deployedBlueprint }}
154 name: {{ include "common.fullname" . }}-blueprints
155 resources: {{ include "common.resources" . | nindent 12 }}
156 {{- if .Values.nodeSelector }}
158 {{ toYaml .Values.nodeSelector | indent 10 }}
160 {{- if .Values.affinity }}
162 {{ toYaml .Values.affinity | indent 10 }}
164 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
166 - name: {{ include "common.fullname" . }}-config
168 name: {{ include "common.fullname" . }}-configmap
170 - key: application.properties
171 path: application.properties
172 - key: error-messages_en.properties
173 path: error-messages_en.properties
176 - key: hazelcast.yaml
178 - name: {{ include "common.fullname" . }}-blueprints
179 persistentVolumeClaim:
180 claimName: {{ include "common.release" . }}-cds-blueprints
181 - name: processed-config
184 {{- include "common.imagePullSecrets" . | nindent 6 }}