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}}"
164 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
165 - name: KARAF_CONSOLE_LOG_LEVEL
166 value: "{{ include "common.log.level" . }}"
168 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
169 {{- if eq .Values.config.sdnr.mode "web" }}
174 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
176 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
177 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
178 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
179 - name: SDNRDBTRUSTALLCERTS
184 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
185 - mountPath: /etc/localtime
188 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
189 name: sdnc-logging-cfg-config
190 subPath: org.ops4j.pax.logging.cfg
191 - mountPath: {{ .Values.config.binDir }}/startODL.sh
194 - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
196 subPath: startODL.oom.sh
197 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
199 subPath: installSdncDb.sh
200 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
202 subPath: aaiclient.properties
203 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
205 subPath: aaiclient.properties
206 - mountPath: {{ .Values.config.configDir }}/dblib.properties
208 subPath: dblib.properties
209 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
211 subPath: lcm-dg.properties
212 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
214 subPath: svclogic.properties
215 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
217 subPath: svclogic.properties
218 - mountPath: {{ .Values.config.configDir }}/netbox.properties
220 subPath: netbox.properties
221 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
223 subPath: blueprints-processor-adaptor.properties
224 - mountPath: {{ .Values.persistence.mdsalPath }}
225 name: {{ include "common.fullname" . }}-data
226 - mountPath: /var/log/onap
228 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
231 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
233 subPath: org.opendaylight.controller.cluster.datastore.cfg
234 - mountPath: {{ .Values.config.odl.binDir }}/setenv
237 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
239 subPath: mountpoint-registrar.properties
240 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
242 subPath: mountpoint-state-provider.properties
244 {{ include "common.resources" . | indent 12 }}
245 {{- if .Values.nodeSelector }}
247 {{ toYaml .Values.nodeSelector | indent 10 }}
249 {{- if .Values.affinity }}
251 {{ toYaml .Values.affinity | indent 10 }}
254 # side car containers
255 - name: filebeat-onap
256 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
257 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
259 - mountPath: /usr/share/filebeat/filebeat.yml
261 subPath: filebeat.yml
262 - mountPath: /var/log/onap
264 - mountPath: /usr/share/filebeat/data
267 - name: "{{ include "common.namespace" . }}-docker-registry-key"
274 - name: data-filebeat
276 - name: filebeat-conf
278 name: {{ include "common.fullname" . }}-filebeat-configmap
279 - name: sdnc-logging-cfg-config
281 name: {{ include "common.fullname" . }}-log-configmap
284 name: {{ include "common.fullname" . }}-bin
288 name: {{ include "common.fullname" . }}-properties
293 {{ if not .Values.persistence.enabled }}
294 - name: {{ include "common.fullname" . }}-data
297 {{ include "common.certInitializer.volumes" . | nindent 8 }}
298 volumeClaimTemplates:
300 name: {{ include "common.fullname" . }}-data
302 name: {{ include "common.fullname" . }}
303 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
304 release: "{{ include "common.release" . }}"
305 heritage: "{{ .Release.Service }}"
308 - {{ .Values.persistence.accessMode }}
309 storageClassName: {{ include "common.storageClass" . }}
312 storage: {{ .Values.persistence.size }}