2 # Copyright © 2020 Samsung Electronics
3 # Copyright © 2017 Amdocs, Bell Canada
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.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
24 app: {{ include "common.name" . }}
25 serviceName: {{ include "common.servicename" . }}-cluster
26 replicas: {{ .Values.replicaCount }}
27 selector: {{- include "common.selectors" . | nindent 4 }}
28 podManagementPolicy: Parallel
30 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
37 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
39 - name: AAI_CLIENT_NAME
40 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
41 - name: AAI_CLIENT_PASSWORD
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
43 - name: MODELSERVICE_USER
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
45 - name: MODELSERVICE_PASSWORD
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
49 - name: RESTCONF_PASSWORD
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
53 - name: ANSIBLE_PASSWORD
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
57 - name: SCALEOUT_PASSWORD
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
63 - name: SDNC_DB_PASSWORD
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
66 - mountPath: /config-input
70 image: "{{ .Values.global.envsubstImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 name: {{ include "common.name" . }}-update-config
73 {{ if .Values.dgbuilder.enabled -}}
77 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
79 - {{ include "common.mariadbService" . }}
81 {{ if .Values.config.sdnr.enabled -}}
83 - {{ include "common.name" . }}-sdnrdb-init-job
90 fieldPath: metadata.namespace
91 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 name: {{ include "common.name" . }}-readiness
95 {{ include "common.certInitializer.initContainer" . | indent 6 }}
97 {{ if .Values.global.cmpv2Enabled }}
99 image: "{{ .Values.global.repository }}/{{ .Values.global.platform.certServiceClient.image }}"
100 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 value: {{ .Values.global.platform.certServiceClient.envVariables.requestURL }}
104 - name: REQUEST_TIMEOUT
107 value: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
109 value: {{ .Values.global.platform.certServiceClient.envVariables.caName }}
111 value: {{ .Values.global.platform.certServiceClient.envVariables.common_name }}
113 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Organization }}
114 - name: ORGANIZATION_UNIT
115 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}
117 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Location }}
119 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2State }}
121 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Country }}
122 - name: KEYSTORE_PATH
123 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePath }}
124 - name: KEYSTORE_PASSWORD
125 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePassword }}
126 - name: TRUSTSTORE_PATH
127 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePath }}
128 - name: TRUSTSTORE_PASSWORD
129 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePassword }}
130 terminationMessagePath: /dev/termination-log
131 terminationMessagePolicy: File
133 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
135 - mountPath: {{ .Values.global.platform.certServiceClient.secret.mountPath }}
136 name: certservice-tls-volume
139 - name: {{ include "common.name" . }}-chown
140 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
145 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
146 {{- if .Values.global.aafEnabled }}
147 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
150 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
151 - mountPath: {{ .Values.persistence.mdsalPath }}
152 name: {{ include "common.fullname" . }}-data
154 - name: {{ include "common.name" . }}
155 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
156 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
157 {{- if not .Values.config.sdnr.enabled }}
158 command: ["/bin/bash"]
159 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
161 command: ["/bin/bash"]
162 args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
165 - containerPort: {{ .Values.service.internalPort }}
166 - containerPort: {{ .Values.service.internalPort2 }}
167 - containerPort: {{ .Values.service.internalPort3 }}
168 - containerPort: {{ .Values.service.clusterPort }}
171 port: {{ .Values.service.internalPort }}
172 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
173 periodSeconds: {{ .Values.readiness.periodSeconds }}
175 - name: MYSQL_ROOT_PASSWORD
176 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
177 - name: ODL_ADMIN_USERNAME
178 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
179 - name: ODL_ADMIN_PASSWORD
180 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
182 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
183 - name: SDNC_DB_PASSWORD
184 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
185 - name: SDNC_CONFIG_DIR
186 value: "{{ .Values.config.configDir }}"
187 - name: ENABLE_ODL_CLUSTER
188 value: "{{ .Values.config.enableClustering }}"
189 - name: MY_ODL_CLUSTER
190 value: "{{ .Values.config.myODLCluster }}"
191 - name: PEER_ODL_CLUSTER
192 value: "{{ .Values.config.peerODLCluster }}"
193 - name: IS_PRIMARY_CLUSTER
194 value: "{{ .Values.config.isPrimaryCluster }}"
196 value: "{{ .Values.config.geoEnabled}}"
197 - name: SDNC_AAF_ENABLED
198 value: "{{ .Values.global.aafEnabled}}"
199 - name: SDNC_REPLICAS
200 value: "{{ .Values.replicaCount }}"
202 value: {{ include "common.mariadbService" . }}
204 value: "{{ .Values.config.javaHome}}"
206 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
207 - name: KARAF_CONSOLE_LOG_LEVEL
208 value: "{{ include "common.log.level" . }}"
210 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
211 {{- if eq .Values.config.sdnr.mode "web" }}
216 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
218 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
219 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
220 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
221 - name: SDNRDBTRUSTALLCERTS
226 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
227 - mountPath: /etc/localtime
230 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
231 name: sdnc-logging-cfg-config
232 subPath: org.ops4j.pax.logging.cfg
233 - mountPath: {{ .Values.config.binDir }}/startODL.sh
236 - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
238 subPath: startODL.oom.sh
239 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
241 subPath: installSdncDb.sh
242 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
244 subPath: aaiclient.properties
245 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
247 subPath: aaiclient.properties
248 - mountPath: {{ .Values.config.configDir }}/dblib.properties
250 subPath: dblib.properties
251 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
253 subPath: lcm-dg.properties
254 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
256 subPath: svclogic.properties
257 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
259 subPath: svclogic.properties
260 - mountPath: {{ .Values.config.configDir }}/netbox.properties
262 subPath: netbox.properties
263 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
265 subPath: blueprints-processor-adaptor.properties
266 - mountPath: {{ .Values.persistence.mdsalPath }}
267 name: {{ include "common.fullname" . }}-data
268 - mountPath: /var/log/onap
270 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
273 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
275 subPath: org.opendaylight.controller.cluster.datastore.cfg
276 - mountPath: {{ .Values.config.odl.binDir }}/setenv
279 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
281 subPath: mountpoint-registrar.properties
282 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
284 subPath: mountpoint-state-provider.properties
285 {{ if .Values.global.cmpv2Enabled }}
286 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
290 {{ include "common.resources" . | indent 12 }}
291 {{- if .Values.nodeSelector }}
293 {{ toYaml .Values.nodeSelector | indent 10 }}
295 {{- if .Values.affinity }}
297 {{ toYaml .Values.affinity | indent 10 }}
300 # side car containers
301 - name: filebeat-onap
302 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
303 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
305 - mountPath: /usr/share/filebeat/filebeat.yml
307 subPath: filebeat.yml
308 - mountPath: /var/log/onap
310 - mountPath: /usr/share/filebeat/data
313 - name: "{{ include "common.namespace" . }}-docker-registry-key"
320 - name: data-filebeat
322 - name: filebeat-conf
324 name: {{ include "common.fullname" . }}-filebeat-configmap
325 - name: sdnc-logging-cfg-config
327 name: {{ include "common.fullname" . }}-log-configmap
330 name: {{ include "common.fullname" . }}-bin
334 name: {{ include "common.fullname" . }}-properties
339 {{ if .Values.global.cmpv2Enabled }}
343 - name: certservice-tls-volume
345 secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
347 {{ if not .Values.persistence.enabled }}
348 - name: {{ include "common.fullname" . }}-data
351 {{ include "common.certInitializer.volumes" . | nindent 8 }}
352 volumeClaimTemplates:
354 name: {{ include "common.fullname" . }}-data
356 name: {{ include "common.fullname" . }}
357 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
358 release: "{{ include "common.release" . }}"
359 heritage: "{{ .Release.Service }}"
362 - {{ .Values.persistence.accessMode }}
363 storageClassName: {{ include "common.storageClass" . }}
366 storage: {{ .Values.persistence.size }}