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 }}
69 {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }}
70 - name: DMAAP_HTTP_PROXY_USERNAME
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
72 - name: DMAAP_HTTP_PROXY_PASSWORD
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
78 - mountPath: /config-input
82 image: {{ include "repositoryGenerator.image.envsubst" . }}
83 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 name: {{ include "common.name" . }}-update-config
85 {{ if .Values.dgbuilder.enabled -}}
89 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
91 - {{ include "common.mariadbService" . }}
93 {{ if .Values.config.sdnr.enabled -}}
95 - {{ include "common.name" . }}-sdnrdb-init-job
102 fieldPath: metadata.namespace
103 image: {{ include "repositoryGenerator.image.readiness" . }}
104 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
105 name: {{ include "common.name" . }}-readiness
107 {{ include "common.certInitializer.initContainer" . | indent 6 }}
109 {{ if .Values.global.cmpv2Enabled }}
111 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.platform.certServiceClient.image }}
112 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
115 value: {{ .Values.global.platform.certServiceClient.envVariables.requestURL }}
116 - name: REQUEST_TIMEOUT
119 value: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
121 value: {{ .Values.global.platform.certServiceClient.envVariables.caName }}
123 value: {{ .Values.global.platform.certServiceClient.envVariables.common_name }}
125 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Organization }}
126 - name: ORGANIZATION_UNIT
127 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}
129 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Location }}
131 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2State }}
133 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Country }}
134 - name: KEYSTORE_PATH
135 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePath }}
136 - name: KEYSTORE_PASSWORD
137 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePassword }}
138 - name: TRUSTSTORE_PATH
139 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePath }}
140 - name: TRUSTSTORE_PASSWORD
141 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePassword }}
142 terminationMessagePath: /dev/termination-log
143 terminationMessagePolicy: File
145 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
147 - mountPath: {{ .Values.global.platform.certServiceClient.secret.mountPath }}
148 name: certservice-tls-volume
151 - name: {{ include "common.name" . }}-chown
152 image: {{ include "repositoryGenerator.image.busybox" . }}
157 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
158 {{- if .Values.global.aafEnabled }}
159 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
162 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
163 - mountPath: {{ .Values.persistence.mdsalPath }}
164 name: {{ include "common.fullname" . }}-data
166 - name: {{ include "common.name" . }}
167 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
168 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
169 command: ["/bin/bash"]
170 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
172 - containerPort: {{ .Values.service.internalPort }}
173 - containerPort: {{ .Values.service.internalPort2 }}
174 - containerPort: {{ .Values.service.internalPort3 }}
175 - containerPort: {{ .Values.service.clusterPort }}
178 port: {{ .Values.service.internalPort }}
179 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
180 periodSeconds: {{ .Values.readiness.periodSeconds }}
182 - name: MYSQL_ROOT_PASSWORD
183 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
184 - name: ODL_ADMIN_USERNAME
185 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
186 - name: ODL_ADMIN_PASSWORD
187 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
189 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
190 - name: SDNC_DB_PASSWORD
191 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
192 - name: SDNC_CONFIG_DIR
193 value: "{{ .Values.config.configDir }}"
194 - name: ENABLE_ODL_CLUSTER
195 value: "{{ .Values.config.enableClustering }}"
196 - name: MY_ODL_CLUSTER
197 value: "{{ .Values.config.myODLCluster }}"
198 - name: PEER_ODL_CLUSTER
199 value: "{{ .Values.config.peerODLCluster }}"
200 - name: IS_PRIMARY_CLUSTER
201 value: "{{ .Values.config.isPrimaryCluster }}"
203 value: "{{ .Values.config.geoEnabled}}"
204 - name: SDNC_AAF_ENABLED
205 value: "{{ .Values.global.aafEnabled}}"
206 - name: SDNC_REPLICAS
207 value: "{{ .Values.replicaCount }}"
209 value: {{ include "common.mariadbService" . }}
211 value: "{{ .Values.config.javaHome}}"
213 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
214 - name: KARAF_CONSOLE_LOG_LEVEL
215 value: "{{ include "common.log.level" . }}"
217 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
218 {{- if eq .Values.config.sdnr.mode "web" }}
223 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
225 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
226 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
227 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
228 - name: SDNRDBTRUSTALLCERTS
233 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
234 - mountPath: /etc/localtime
237 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
238 name: sdnc-logging-cfg-config
239 subPath: org.ops4j.pax.logging.cfg
240 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
242 subPath: installSdncDb.sh
243 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
245 subPath: aaiclient.properties
246 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
248 subPath: aaiclient.properties
249 - mountPath: {{ .Values.config.configDir }}/dblib.properties
251 subPath: dblib.properties
252 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
254 subPath: lcm-dg.properties
255 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
257 subPath: svclogic.properties
258 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
260 subPath: svclogic.properties
261 - mountPath: {{ .Values.config.configDir }}/netbox.properties
263 subPath: netbox.properties
264 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
266 subPath: blueprints-processor-adaptor.properties
267 - mountPath: {{ .Values.persistence.mdsalPath }}
268 name: {{ include "common.fullname" . }}-data
269 - mountPath: /var/log/onap
271 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
274 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
276 subPath: org.opendaylight.controller.cluster.datastore.cfg
277 - mountPath: {{ .Values.config.odl.binDir }}/setenv
280 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
282 subPath: mountpoint-registrar.properties
283 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
285 subPath: mountpoint-state-provider.properties
286 {{ if .Values.global.cmpv2Enabled }}
287 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
291 {{ include "common.resources" . | indent 12 }}
292 {{- if .Values.nodeSelector }}
294 {{ toYaml .Values.nodeSelector | indent 10 }}
296 {{- if .Values.affinity }}
298 {{ toYaml .Values.affinity | indent 10 }}
301 # side car containers
302 - name: filebeat-onap
303 image: {{ include "repositoryGenerator.image.logging" . }}
304 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
306 - mountPath: /usr/share/filebeat/filebeat.yml
308 subPath: filebeat.yml
309 - mountPath: /var/log/onap
311 - mountPath: /usr/share/filebeat/data
314 - name: "{{ include "common.namespace" . }}-docker-registry-key"
321 - name: data-filebeat
323 - name: filebeat-conf
325 name: {{ include "common.fullname" . }}-filebeat-configmap
326 - name: sdnc-logging-cfg-config
328 name: {{ include "common.fullname" . }}-log-configmap
331 name: {{ include "common.fullname" . }}-bin
335 name: {{ include "common.fullname" . }}-properties
340 {{ if .Values.global.cmpv2Enabled }}
344 - name: certservice-tls-volume
346 secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
348 {{ if not .Values.persistence.enabled }}
349 - name: {{ include "common.fullname" . }}-data
352 {{ include "common.certInitializer.volumes" . | nindent 8 }}
353 volumeClaimTemplates:
355 name: {{ include "common.fullname" . }}-data
357 name: {{ include "common.fullname" . }}
358 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
359 release: "{{ include "common.release" . }}"
360 heritage: "{{ .Release.Service }}"
363 - {{ .Values.persistence.accessMode }}
364 storageClassName: {{ include "common.storageClass" . }}
367 storage: {{ .Values.persistence.size }}