2 # Copyright © 2020 Samsung Electronics, highstreet technologies GmbH
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 - name: {{ include "common.name" . }}-chown
98 image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
103 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
104 {{- if .Values.global.aafEnabled }}
105 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
108 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
109 - mountPath: {{ .Values.persistence.mdsalPath }}
110 name: {{ include "common.fullname" . }}-data
112 - name: {{ include "common.name" . }}
113 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
114 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
115 {{- if not .Values.config.sdnr.enabled }}
116 command: ["/bin/bash"]
117 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
119 command: ["/bin/bash"]
120 args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
123 - containerPort: {{ .Values.service.internalPort }}
124 - containerPort: {{ .Values.service.internalPort2 }}
125 - containerPort: {{ .Values.service.internalPort3 }}
126 - containerPort: {{ .Values.service.clusterPort }}
129 port: {{ .Values.service.internalPort }}
130 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
131 periodSeconds: {{ .Values.readiness.periodSeconds }}
133 - name: MYSQL_ROOT_PASSWORD
134 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
135 - name: ODL_ADMIN_USERNAME
136 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
137 - name: ODL_ADMIN_PASSWORD
138 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
140 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
141 - name: SDNC_DB_PASSWORD
142 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
143 - name: SDNC_CONFIG_DIR
144 value: "{{ .Values.config.configDir }}"
145 - name: ENABLE_ODL_CLUSTER
146 value: "{{ .Values.config.enableClustering }}"
147 - name: MY_ODL_CLUSTER
148 value: "{{ .Values.config.myODLCluster }}"
149 - name: PEER_ODL_CLUSTER
150 value: "{{ .Values.config.peerODLCluster }}"
151 - name: IS_PRIMARY_CLUSTER
152 value: "{{ .Values.config.isPrimaryCluster }}"
154 value: "{{ .Values.config.geoEnabled}}"
155 - name: SDNC_AAF_ENABLED
156 value: "{{ .Values.global.aafEnabled}}"
157 - name: SDNC_REPLICAS
158 value: "{{ .Values.replicaCount }}"
160 value: {{ include "common.mariadbService" . }}
162 value: "{{ .Values.config.javaHome}}"
163 - name: KARAF_CONSOLE_LOG_LEVEL
164 value: "{{ include "common.log.level" . }}"
166 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
167 {{- if eq .Values.config.sdnr.mode "web" }}
172 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
174 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
175 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
176 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
177 - name: SDNRDBTRUSTALLCERTS
182 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
183 - mountPath: /etc/localtime
186 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
187 name: sdnc-logging-cfg-config
188 subPath: org.ops4j.pax.logging.cfg
189 - mountPath: {{ .Values.config.binDir }}/startODL.sh
192 - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
194 subPath: startODL.oom.sh
195 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
197 subPath: installSdncDb.sh
198 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
200 subPath: aaiclient.properties
201 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
203 subPath: aaiclient.properties
204 - mountPath: {{ .Values.config.configDir }}/dblib.properties
206 subPath: dblib.properties
207 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
209 subPath: lcm-dg.properties
210 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
212 subPath: svclogic.properties
213 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
215 subPath: svclogic.properties
216 - mountPath: {{ .Values.config.configDir }}/netbox.properties
218 subPath: netbox.properties
219 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
221 subPath: blueprints-processor-adaptor.properties
222 - mountPath: {{ .Values.persistence.mdsalPath }}
223 name: {{ include "common.fullname" . }}-data
224 - mountPath: /var/log/onap
226 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
229 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
231 subPath: org.opendaylight.controller.cluster.datastore.cfg
232 - mountPath: {{ .Values.config.odl.binDir }}/setenv
235 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
237 subPath: mountpoint-registrar.properties
238 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
240 subPath: mountpoint-state-provider.properties
242 {{ include "common.resources" . | indent 12 }}
243 {{- if .Values.nodeSelector }}
245 {{ toYaml .Values.nodeSelector | indent 10 }}
247 {{- if .Values.affinity }}
249 {{ toYaml .Values.affinity | indent 10 }}
252 # side car containers
253 - name: filebeat-onap
254 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
255 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
257 - mountPath: /usr/share/filebeat/filebeat.yml
259 subPath: filebeat.yml
260 - mountPath: /var/log/onap
262 - mountPath: /usr/share/filebeat/data
265 - name: "{{ include "common.namespace" . }}-docker-registry-key"
272 - name: data-filebeat
274 - name: filebeat-conf
276 name: {{ include "common.fullname" . }}-filebeat-configmap
277 - name: sdnc-logging-cfg-config
279 name: {{ include "common.fullname" . }}-log-configmap
282 name: {{ include "common.fullname" . }}-bin
286 name: {{ include "common.fullname" . }}-properties
291 {{ if not .Values.persistence.enabled }}
292 - name: {{ include "common.fullname" . }}-data
295 {{ include "common.certInitializer.volumes" . | nindent 8 }}
296 volumeClaimTemplates:
298 name: {{ include "common.fullname" . }}-data
300 name: {{ include "common.fullname" . }}
301 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
302 release: "{{ include "common.release" . }}"
303 heritage: "{{ .Release.Service }}"
306 - {{ .Values.persistence.accessMode }}
307 storageClassName: {{ include "common.storageClass" . }}
310 storage: {{ .Values.persistence.size }}