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.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 serviceName: {{ include "common.servicename" . }}-cluster
33 replicas: {{ .Values.replicaCount }}
34 podManagementPolicy: Parallel
38 app: {{ include "common.name" . }}
39 release: {{ include "common.release" . }}
46 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
48 - name: AAI_CLIENT_NAME
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
50 - name: AAI_CLIENT_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
52 - name: MODELSERVICE_USER
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
54 - name: MODELSERVICE_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
58 - name: RESTCONF_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
62 - name: ANSIBLE_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
66 - name: SCALEOUT_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
72 - name: SDNC_DB_PASSWORD
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
75 - mountPath: /config-input
79 image: "{{ .Values.global.envsubstImage }}"
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 name: {{ include "common.name" . }}-update-config
87 - {{ include "common.mariadbService" . }}
93 fieldPath: metadata.namespace
94 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 name: {{ include "common.name" . }}-readiness
98 {{ include "common.certInitializer.initContainer" . | indent 6 }}
100 - name: {{ include "common.name" . }}-chown
106 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
107 {{- if .Values.global.aafEnabled }}
108 - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
111 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
112 - mountPath: {{ .Values.persistence.mdsalPath }}
113 name: {{ include "common.fullname" . }}-data
115 - name: {{ include "common.name" . }}
116 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
117 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
118 command: ["/bin/bash"]
119 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
121 - containerPort: {{ .Values.service.internalPort }}
122 - containerPort: {{ .Values.service.internalPort2 }}
123 - containerPort: {{ .Values.service.internalPort3 }}
124 - containerPort: {{ .Values.service.clusterPort }}
127 port: {{ .Values.service.internalPort }}
128 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
129 periodSeconds: {{ .Values.readiness.periodSeconds }}
131 - name: MYSQL_ROOT_PASSWORD
132 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
133 - name: ODL_ADMIN_USERNAME
134 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
135 - name: ODL_ADMIN_PASSWORD
136 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
138 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
139 - name: SDNC_DB_PASSWORD
140 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
141 - name: SDNC_CONFIG_DIR
142 value: "{{ .Values.config.configDir }}"
143 - name: ENABLE_ODL_CLUSTER
144 value: "{{ .Values.config.enableClustering }}"
145 - name: MY_ODL_CLUSTER
146 value: "{{ .Values.config.myODLCluster }}"
147 - name: PEER_ODL_CLUSTER
148 value: "{{ .Values.config.peerODLCluster }}"
149 - name: IS_PRIMARY_CLUSTER
150 value: "{{ .Values.config.isPrimaryCluster }}"
152 value: "{{ .Values.config.geoEnabled}}"
153 - name: SDNC_AAF_ENABLED
154 value: "{{ .Values.global.aafEnabled}}"
155 - name: SDNC_REPLICAS
156 value: "{{ .Values.replicaCount }}"
158 value: {{ include "common.mariadbService" . }}
160 value: "{{ .Values.config.javaHome}}"
161 - name: KARAF_CONSOLE_LOG_LEVEL
162 value: "{{ include "common.log.level" . }}"
164 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
165 - mountPath: /etc/localtime
168 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
169 name: sdnc-logging-cfg-config
170 subPath: org.ops4j.pax.logging.cfg
171 - mountPath: {{ .Values.config.binDir }}/startODL.sh
174 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
176 subPath: installSdncDb.sh
177 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
179 subPath: aaiclient.properties
180 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
182 subPath: aaiclient.properties
183 - mountPath: {{ .Values.config.configDir }}/dblib.properties
185 subPath: dblib.properties
186 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
188 subPath: lcm-dg.properties
189 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
191 subPath: svclogic.properties
192 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
194 subPath: svclogic.properties
195 - mountPath: {{ .Values.config.configDir }}/netbox.properties
197 subPath: netbox.properties
198 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
200 subPath: blueprints-processor-adaptor.properties
201 - mountPath: {{ .Values.persistence.mdsalPath }}
202 name: {{ include "common.fullname" . }}-data
203 - mountPath: /var/log/onap
205 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
208 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
210 subPath: org.opendaylight.controller.cluster.datastore.cfg
211 - mountPath: {{ .Values.config.odl.binDir }}/setenv
215 {{ include "common.resources" . | indent 12 }}
216 {{- if .Values.nodeSelector }}
218 {{ toYaml .Values.nodeSelector | indent 10 }}
220 {{- if .Values.affinity }}
222 {{ toYaml .Values.affinity | indent 10 }}
225 # side car containers
226 - name: filebeat-onap
227 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
228 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
230 - mountPath: /usr/share/filebeat/filebeat.yml
232 subPath: filebeat.yml
233 - mountPath: /var/log/onap
235 - mountPath: /usr/share/filebeat/data
238 - name: "{{ include "common.namespace" . }}-docker-registry-key"
245 - name: data-filebeat
247 - name: filebeat-conf
249 name: {{ include "common.fullname" . }}-filebeat-configmap
250 - name: sdnc-logging-cfg-config
252 name: {{ include "common.fullname" . }}-log-configmap
255 name: {{ include "common.fullname" . }}-bin
259 name: {{ include "common.fullname" . }}-properties
264 {{ if not .Values.persistence.enabled }}
265 - name: {{ include "common.fullname" . }}-data
268 {{ include "common.certInitializer.volumes" . | nindent 8 }}
269 volumeClaimTemplates:
271 name: {{ include "common.fullname" . }}-data
273 name: {{ include "common.fullname" . }}
274 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
275 release: "{{ include "common.release" . }}"
276 heritage: "{{ .Release.Service }}"
279 - {{ .Values.persistence.accessMode }}
280 storageClassName: {{ include "common.storageClass" . }}
283 storage: {{ .Values.persistence.size }}