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 }}
65 - name: ODL_ADMIN_USERNAME
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
67 - name: ODL_ADMIN_PASSWORD
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
71 - mountPath: /config-input
75 image: "{{ .Values.global.envsubstImage }}"
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: {{ include "common.name" . }}-update-config
78 {{ if .Values.dgbuilder.enabled -}}
82 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
84 - {{ include "common.mariadbService" . }}
86 {{ if .Values.config.sdnr.enabled -}}
88 - {{ include "common.name" . }}-sdnrdb-init-job
95 fieldPath: metadata.namespace
96 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 name: {{ include "common.name" . }}-readiness
100 {{ include "common.certInitializer.initContainer" . | indent 6 }}
102 {{ if .Values.global.cmpv2Enabled }}
104 image: "{{ .Values.global.repository }}/{{ .Values.global.platform.certServiceClient.image }}"
105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 value: {{ .Values.global.platform.certServiceClient.envVariables.requestURL }}
109 - name: REQUEST_TIMEOUT
112 value: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
114 value: {{ .Values.global.platform.certServiceClient.envVariables.caName }}
116 value: {{ .Values.global.platform.certServiceClient.envVariables.common_name }}
118 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Organization }}
119 - name: ORGANIZATION_UNIT
120 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}
122 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Location }}
124 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2State }}
126 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Country }}
127 - name: KEYSTORE_PATH
128 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePath }}
129 - name: KEYSTORE_PASSWORD
130 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePassword }}
131 - name: TRUSTSTORE_PATH
132 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePath }}
133 - name: TRUSTSTORE_PASSWORD
134 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePassword }}
135 terminationMessagePath: /dev/termination-log
136 terminationMessagePolicy: File
138 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
140 - mountPath: {{ .Values.global.platform.certServiceClient.secret.mountPath }}
141 name: certservice-tls-volume
144 - name: {{ include "common.name" . }}-chown
145 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
150 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
151 {{- if .Values.global.aafEnabled }}
152 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
155 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
156 - mountPath: {{ .Values.persistence.mdsalPath }}
157 name: {{ include "common.fullname" . }}-data
159 - name: {{ include "common.name" . }}
160 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
161 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
162 {{- if not .Values.config.sdnr.enabled }}
163 command: ["/bin/bash"]
164 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
166 command: ["/bin/bash"]
167 args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
170 - containerPort: {{ .Values.service.internalPort }}
171 - containerPort: {{ .Values.service.internalPort2 }}
172 - containerPort: {{ .Values.service.internalPort3 }}
173 - containerPort: {{ .Values.service.clusterPort }}
176 port: {{ .Values.service.internalPort }}
177 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
178 periodSeconds: {{ .Values.readiness.periodSeconds }}
180 - name: MYSQL_ROOT_PASSWORD
181 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
182 - name: ODL_ADMIN_USERNAME
183 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
184 - name: ODL_ADMIN_PASSWORD
185 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
187 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
188 - name: SDNC_DB_PASSWORD
189 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
190 - name: SDNC_CONFIG_DIR
191 value: "{{ .Values.config.configDir }}"
192 - name: ENABLE_ODL_CLUSTER
193 value: "{{ .Values.config.enableClustering }}"
194 - name: MY_ODL_CLUSTER
195 value: "{{ .Values.config.myODLCluster }}"
196 - name: PEER_ODL_CLUSTER
197 value: "{{ .Values.config.peerODLCluster }}"
198 - name: IS_PRIMARY_CLUSTER
199 value: "{{ .Values.config.isPrimaryCluster }}"
201 value: "{{ .Values.config.geoEnabled}}"
202 - name: SDNC_AAF_ENABLED
203 value: "{{ .Values.global.aafEnabled}}"
204 - name: SDNC_REPLICAS
205 value: "{{ .Values.replicaCount }}"
207 value: {{ include "common.mariadbService" . }}
209 value: "{{ .Values.config.javaHome}}"
211 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
212 - name: KARAF_CONSOLE_LOG_LEVEL
213 value: "{{ include "common.log.level" . }}"
215 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
216 {{- if eq .Values.config.sdnr.mode "web" }}
221 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
223 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
224 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
225 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
226 - name: SDNRDBTRUSTALLCERTS
231 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
232 - mountPath: /etc/localtime
235 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
236 name: sdnc-logging-cfg-config
237 subPath: org.ops4j.pax.logging.cfg
238 - mountPath: {{ .Values.config.binDir }}/startODL.sh
241 - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
243 subPath: startODL.oom.sh
244 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
246 subPath: installSdncDb.sh
247 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
249 subPath: aaiclient.properties
250 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
252 subPath: aaiclient.properties
253 - mountPath: {{ .Values.config.configDir }}/dblib.properties
255 subPath: dblib.properties
256 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
258 subPath: lcm-dg.properties
259 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
261 subPath: svclogic.properties
262 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
264 subPath: svclogic.properties
265 - mountPath: {{ .Values.config.configDir }}/netbox.properties
267 subPath: netbox.properties
268 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
270 subPath: blueprints-processor-adaptor.properties
271 - mountPath: {{ .Values.persistence.mdsalPath }}
272 name: {{ include "common.fullname" . }}-data
273 - mountPath: /var/log/onap
275 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
278 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
280 subPath: org.opendaylight.controller.cluster.datastore.cfg
281 - mountPath: {{ .Values.config.odl.binDir }}/setenv
284 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
286 subPath: mountpoint-registrar.properties
287 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
289 subPath: mountpoint-state-provider.properties
290 {{ if .Values.global.cmpv2Enabled }}
291 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
295 {{ include "common.resources" . | indent 12 }}
296 {{- if .Values.nodeSelector }}
298 {{ toYaml .Values.nodeSelector | indent 10 }}
300 {{- if .Values.affinity }}
302 {{ toYaml .Values.affinity | indent 10 }}
305 # side car containers
306 - name: filebeat-onap
307 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
308 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
310 - mountPath: /usr/share/filebeat/filebeat.yml
312 subPath: filebeat.yml
313 - mountPath: /var/log/onap
315 - mountPath: /usr/share/filebeat/data
318 - name: "{{ include "common.namespace" . }}-docker-registry-key"
325 - name: data-filebeat
327 - name: filebeat-conf
329 name: {{ include "common.fullname" . }}-filebeat-configmap
330 - name: sdnc-logging-cfg-config
332 name: {{ include "common.fullname" . }}-log-configmap
335 name: {{ include "common.fullname" . }}-bin
339 name: {{ include "common.fullname" . }}-properties
344 {{ if .Values.global.cmpv2Enabled }}
348 - name: certservice-tls-volume
350 secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
352 {{ if not .Values.persistence.enabled }}
353 - name: {{ include "common.fullname" . }}-data
356 {{ include "common.certInitializer.volumes" . | nindent 8 }}
357 volumeClaimTemplates:
359 name: {{ include "common.fullname" . }}-data
361 name: {{ include "common.fullname" . }}
362 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
363 release: "{{ include "common.release" . }}"
364 heritage: "{{ .Release.Service }}"
367 - {{ .Values.persistence.accessMode }}
368 storageClassName: {{ include "common.storageClass" . }}
371 storage: {{ .Values.persistence.size }}