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" . }}-init-files
145 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
151 mkdir {{ .Values.persistence.mdsalPath }}/journal
152 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
153 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
154 {{- if .Values.global.aafEnabled }}
155 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
158 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
159 - mountPath: {{ .Values.persistence.mdsalPath }}
160 name: {{ include "common.fullname" . }}-data
162 - name: {{ include "common.name" . }}
163 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
164 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
165 command: ["/bin/bash"]
166 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
168 - containerPort: {{ .Values.service.internalPort }}
169 - containerPort: {{ .Values.service.internalPort2 }}
170 - containerPort: {{ .Values.service.internalPort3 }}
171 - containerPort: {{ .Values.service.clusterPort }}
174 port: {{ .Values.service.internalPort }}
175 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
176 periodSeconds: {{ .Values.readiness.periodSeconds }}
178 - name: MYSQL_ROOT_PASSWORD
179 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
180 - name: ODL_ADMIN_USERNAME
181 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
182 - name: ODL_ADMIN_PASSWORD
183 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
185 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
186 - name: SDNC_DB_PASSWORD
187 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
188 - name: SDNC_CONFIG_DIR
189 value: "{{ .Values.config.configDir }}"
190 - name: ENABLE_ODL_CLUSTER
191 value: "{{ .Values.config.enableClustering }}"
192 - name: MY_ODL_CLUSTER
193 value: "{{ .Values.config.myODLCluster }}"
194 - name: PEER_ODL_CLUSTER
195 value: "{{ .Values.config.peerODLCluster }}"
196 - name: IS_PRIMARY_CLUSTER
197 value: "{{ .Values.config.isPrimaryCluster }}"
199 value: "{{ .Values.config.geoEnabled}}"
200 - name: SDNC_AAF_ENABLED
201 value: "{{ .Values.global.aafEnabled}}"
202 - name: SDNC_REPLICAS
203 value: "{{ .Values.replicaCount }}"
205 value: {{ include "common.mariadbService" . }}
207 value: {{ .Values.persistence.mdsalPath }}
209 value: {{ .Values.persistence.daeximPath }}
211 value: {{ .Values.persistence.journalPath }}
212 - name: SNAPSHOTS_PATH
213 value: {{ .Values.persistence.snapshotsPath }}
215 value: "{{ .Values.config.javaHome}}"
217 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
218 - name: KARAF_CONSOLE_LOG_LEVEL
219 value: "{{ include "common.log.level" . }}"
221 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
222 {{- if eq .Values.config.sdnr.mode "web" }}
227 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
229 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
230 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
231 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
232 - name: SDNRDBTRUSTALLCERTS
237 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
238 - mountPath: /etc/localtime
241 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
242 name: sdnc-logging-cfg-config
243 subPath: org.ops4j.pax.logging.cfg
244 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
246 subPath: installSdncDb.sh
247 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
249 subPath: createLinks.sh
250 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
252 subPath: aaiclient.properties
253 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
255 subPath: aaiclient.properties
256 - mountPath: {{ .Values.config.configDir }}/dblib.properties
258 subPath: dblib.properties
259 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
261 subPath: lcm-dg.properties
262 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
264 subPath: svclogic.properties
265 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
267 subPath: svclogic.properties
268 - mountPath: {{ .Values.config.configDir }}/netbox.properties
270 subPath: netbox.properties
271 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
273 subPath: blueprints-processor-adaptor.properties
274 - mountPath: {{ .Values.persistence.mdsalPath }}
275 name: {{ include "common.fullname" . }}-data
276 - mountPath: /var/log/onap
278 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
281 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
283 subPath: org.opendaylight.controller.cluster.datastore.cfg
284 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
286 subPath: org.opendaylight.aaa.filterchain.cfg
287 - mountPath: {{ .Values.config.odl.binDir }}/setenv
290 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
292 subPath: mountpoint-registrar.properties
293 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
295 subPath: mountpoint-state-provider.properties
296 <<<<<<< HEAD (a66d33 Merge "[MUSIC] Update certificate" into guilin)
297 {{ if .Values.global.cmpv2Enabled }}
298 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
302 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
304 subPath: org.opendaylight.daexim.cfg
305 >>>>>>> CHANGE (a86300 Change path to daexim directory)
307 {{ include "common.resources" . | indent 12 }}
308 {{- if .Values.nodeSelector }}
310 {{ toYaml .Values.nodeSelector | indent 10 }}
312 {{- if .Values.affinity }}
314 {{ toYaml .Values.affinity | indent 10 }}
317 # side car containers
318 - name: filebeat-onap
319 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
320 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
322 - mountPath: /usr/share/filebeat/filebeat.yml
324 subPath: filebeat.yml
325 - mountPath: /var/log/onap
327 - mountPath: /usr/share/filebeat/data
330 - name: "{{ include "common.namespace" . }}-docker-registry-key"
337 - name: data-filebeat
339 - name: filebeat-conf
341 name: {{ include "common.fullname" . }}-filebeat-configmap
342 - name: sdnc-logging-cfg-config
344 name: {{ include "common.fullname" . }}-log-configmap
347 name: {{ include "common.fullname" . }}-bin
351 name: {{ include "common.fullname" . }}-properties
356 {{ if .Values.global.cmpv2Enabled }}
360 - name: certservice-tls-volume
362 secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
364 {{ if not .Values.persistence.enabled }}
365 - name: {{ include "common.fullname" . }}-data
368 {{ include "common.certInitializer.volumes" . | nindent 8 }}
369 volumeClaimTemplates:
371 name: {{ include "common.fullname" . }}-data
373 name: {{ include "common.fullname" . }}
374 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
375 release: "{{ include "common.release" . }}"
376 heritage: "{{ .Release.Service }}"
379 - {{ .Values.persistence.accessMode }}
380 storageClassName: {{ include "common.storageClass" . }}
383 storage: {{ .Values.persistence.size }}