2 # Copyright © 2020 Samsung Electronics
3 # Copyright © 2017 Amdocs, Bell Canada
4 # Copyright © 2021 Nokia
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 }}
25 app: {{ include "common.name" . }}
26 serviceName: {{ include "common.servicename" . }}-cluster
27 replicas: {{ .Values.replicaCount }}
28 selector: {{- include "common.selectors" . | nindent 4 }}
29 podManagementPolicy: Parallel
31 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
38 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
40 - name: AAI_CLIENT_NAME
41 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
42 - name: AAI_CLIENT_PASSWORD
43 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
44 - name: AAI_TRUSTSTORE_PASSWORD
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 10 }}
46 - name: ANSIBLE_TRUSTSTORE_PASSWORD
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 10 }}
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 10 }}
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 10 }}
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 10 }}
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 10 }}
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 10 }}
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 10 }}
60 - name: HONEYCOMB_USER
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 10 }}
62 - name: HONEYCOMB_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 10 }}
64 - name: TRUSTSTORE_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 10 }}
66 - name: KEYSTORE_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 10 }}
70 - name: DMAAP_PASSWORD
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 10 }}
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 10 }}
74 - name: MODELSERVICE_USER
75 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
76 - name: MODELSERVICE_PASSWORD
77 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
79 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
80 - name: RESTCONF_PASSWORD
81 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
83 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
84 - name: ANSIBLE_PASSWORD
85 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
87 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
88 - name: SCALEOUT_PASSWORD
89 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
91 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
93 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
94 - name: SDNC_DB_PASSWORD
95 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
97 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
98 - name: MYSQL_PASSWORD
99 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
100 - name: ODL_ADMIN_USERNAME
101 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
103 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
104 - name: ODL_ADMIN_PASSWORD
105 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
107 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
108 {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }}
109 - name: DMAAP_HTTP_PROXY_USERNAME
110 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
111 - name: DMAAP_HTTP_PROXY_PASSWORD
112 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
117 - mountPath: /config-input
121 image: {{ include "repositoryGenerator.image.envsubst" . }}
122 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
123 name: {{ include "common.name" . }}-update-config
124 {{ if .Values.dgbuilder.enabled -}}
128 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
130 - {{ include "common.mariadbService" . }}
132 - {{ include "common.fullname" . }}-dbinit-job
134 {{ if .Values.config.sdnr.enabled -}}
136 - {{ include "common.name" . }}-sdnrdb-init-job
143 fieldPath: metadata.namespace
144 image: {{ include "repositoryGenerator.image.readiness" . }}
145 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
146 name: {{ include "common.name" . }}-readiness
148 {{ include "common.certInitializer.initContainer" . | indent 6 }}
149 {{ include "common.certServiceClient.initContainer" . | indent 6 }}
150 - name: {{ include "common.name" . }}-chown
151 image: {{ include "repositoryGenerator.image.busybox" . }}
157 mkdir {{ .Values.persistence.mdsalPath }}/journal
158 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
159 mkdir {{ .Values.persistence.mdsalPath }}/daexim
160 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
161 {{- if .Values.global.aafEnabled }}
162 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
165 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
166 - mountPath: {{ .Values.persistence.mdsalPath }}
167 name: {{ include "common.fullname" . }}-data
169 - name: {{ include "common.name" . }}
170 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
171 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
172 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
173 {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
177 command: ["sh", "-c", {{$linkCommand | quote}} ]
179 command: ["/bin/bash"]
180 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
182 - containerPort: {{ .Values.service.internalPort }}
183 - containerPort: {{ .Values.service.internalPort2 }}
184 - containerPort: {{ .Values.service.internalPort3 }}
185 - containerPort: {{ .Values.service.clusterPort }}
188 port: {{ .Values.service.internalPort }}
189 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
190 periodSeconds: {{ .Values.readiness.periodSeconds }}
192 - name: MYSQL_ROOT_PASSWORD
193 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
194 - name: ODL_ADMIN_USERNAME
195 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
197 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
198 - name: ODL_ADMIN_PASSWORD
199 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
201 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
203 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
204 - name: SDNC_DB_PASSWORD
205 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
207 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
208 - name: MYSQL_PASSWORD
209 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
210 - name: MYSQL_DATABASE
211 value: "{{ .Values.config.dbSdnctlDatabase }}"
212 - name: SDNC_CONFIG_DIR
213 value: "{{ .Values.config.configDir }}"
214 - name: AAI_CLIENT_NAME
215 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
216 - name: AAI_CLIENT_PASSWORD
217 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
218 - name: AAI_TRUSTSTORE_PASSWORD
219 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
220 - name: ANSIBLE_TRUSTSTORE_PASSWORD
221 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
223 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
225 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
227 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
228 - name: NENG_PASSWORD
229 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
231 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
233 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
234 - name: HONEYCOMB_USER
235 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
236 - name: HONEYCOMB_PASSWORD
237 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
238 - name: TRUSTSTORE_PASSWORD
239 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
240 - name: KEYSTORE_PASSWORD
241 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
243 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
244 - name: DMAAP_PASSWORD
245 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
246 - name: DMAAP_AUTHKEY
247 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
248 - name: ENABLE_ODL_CLUSTER
249 value: "{{ .Values.config.enableClustering }}"
250 - name: MY_ODL_CLUSTER
251 value: "{{ .Values.config.myODLCluster }}"
252 - name: PEER_ODL_CLUSTER
253 value: "{{ .Values.config.peerODLCluster }}"
254 - name: IS_PRIMARY_CLUSTER
255 value: "{{ .Values.config.isPrimaryCluster }}"
257 value: "{{ .Values.config.geoEnabled}}"
258 - name: SDNC_AAF_ENABLED
259 value: "{{ .Values.global.aafEnabled}}"
260 - name: SDNC_REPLICAS
261 value: "{{ .Values.replicaCount }}"
263 value: {{ include "common.mariadbService" . }}
265 value: {{ .Values.persistence.mdsalPath }}
267 value: {{ .Values.persistence.daeximPath }}
269 value: {{ .Values.persistence.journalPath }}
270 - name: SNAPSHOTS_PATH
271 value: {{ .Values.persistence.snapshotsPath }}
273 value: "{{ .Values.config.javaHome}}"
275 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
276 - name: KARAF_CONSOLE_LOG_LEVEL
277 value: "{{ include "common.log.level" . }}"
279 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
280 {{- if eq .Values.config.sdnr.mode "web" }}
285 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
287 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
288 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
289 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
290 - name: SDNRDBTRUSTALLCERTS
293 {{- if .Values.global.cmpv2Enabled }}
295 value: {{ (mustFirst (.Values.certificates)).mountPath }}
299 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
300 {{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
301 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
302 {{ include "common.certManager.volumeMounts" . | indent 10 }}
304 - mountPath: /etc/localtime
307 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
308 name: sdnc-logging-cfg-config
309 subPath: org.ops4j.pax.logging.cfg
310 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
312 subPath: installSdncDb.sh
313 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
315 subPath: createLinks.sh
316 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
318 subPath: aaiclient.properties
319 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
321 subPath: aaiclient.properties
322 - mountPath: {{ .Values.config.configDir }}/dblib.properties
324 subPath: dblib.properties
325 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
327 subPath: lcm-dg.properties
328 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
330 subPath: svclogic.properties
331 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
333 subPath: svclogic.properties
334 - mountPath: {{ .Values.config.configDir }}/netbox.properties
336 subPath: netbox.properties
337 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
339 subPath: blueprints-processor-adaptor.properties
340 - mountPath: {{ .Values.persistence.mdsalPath }}
341 name: {{ include "common.fullname" . }}-data
342 - mountPath: /var/log/onap
344 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
347 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
349 subPath: org.opendaylight.controller.cluster.datastore.cfg
350 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
352 subPath: org.opendaylight.aaa.filterchain.cfg
353 - mountPath: {{ .Values.config.odl.binDir }}/setenv
356 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
358 subPath: mountpoint-registrar.properties
359 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
361 subPath: mountpoint-state-provider.properties
362 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
364 subPath: org.opendaylight.daexim.cfg
366 {{ include "common.resources" . | indent 12 }}
367 {{- if .Values.nodeSelector }}
369 {{ toYaml .Values.nodeSelector | indent 10 }}
371 {{- if .Values.affinity }}
373 {{ toYaml .Values.affinity | indent 10 }}
376 # side car containers
377 - name: filebeat-onap
378 image: {{ include "repositoryGenerator.image.logging" . }}
379 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
381 - mountPath: /usr/share/filebeat/filebeat.yml
383 subPath: filebeat.yml
384 - mountPath: /var/log/onap
386 - mountPath: /usr/share/filebeat/data
389 - name: "{{ include "common.namespace" . }}-docker-registry-key"
396 - name: data-filebeat
398 - name: filebeat-conf
400 name: {{ include "common.fullname" . }}-filebeat-configmap
401 - name: sdnc-logging-cfg-config
403 name: {{ include "common.fullname" . }}-log-configmap
406 name: {{ include "common.fullname" . }}-bin
410 name: {{ include "common.fullname" . }}-properties
415 {{ if not .Values.persistence.enabled }}
416 - name: {{ include "common.fullname" . }}-data
419 {{ include "common.certInitializer.volumes" . | nindent 8 }}
420 {{ include "common.certServiceClient.volumes" . | nindent 8 }}
421 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
422 {{ include "common.certManager.volumes" . | nindent 8 }}
424 volumeClaimTemplates:
426 name: {{ include "common.fullname" . }}-data
428 name: {{ include "common.fullname" . }}
429 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
430 release: "{{ include "common.release" . }}"
431 heritage: "{{ .Release.Service }}"
434 - {{ .Values.persistence.accessMode }}
435 storageClassName: {{ include "common.storageClass" . }}
438 storage: {{ .Values.persistence.size }}