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}}"
162 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
163 - mountPath: /etc/localtime
166 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
167 name: sdnc-logging-cfg-config
168 subPath: org.ops4j.pax.logging.cfg
169 - mountPath: {{ .Values.config.binDir }}/startODL.sh
172 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
174 subPath: installSdncDb.sh
175 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
177 subPath: aaiclient.properties
178 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
180 subPath: aaiclient.properties
181 - mountPath: {{ .Values.config.configDir }}/dblib.properties
183 subPath: dblib.properties
184 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
186 subPath: lcm-dg.properties
187 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
189 subPath: svclogic.properties
190 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
192 subPath: svclogic.properties
193 - mountPath: {{ .Values.config.configDir }}/netbox.properties
195 subPath: netbox.properties
196 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
198 subPath: blueprints-processor-adaptor.properties
199 - mountPath: {{ .Values.persistence.mdsalPath }}
200 name: {{ include "common.fullname" . }}-data
201 - mountPath: /var/log/onap
203 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
206 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
208 subPath: org.opendaylight.controller.cluster.datastore.cfg
209 - mountPath: {{ .Values.config.odl.binDir }}/setenv
213 {{ include "common.resources" . | indent 12 }}
214 {{- if .Values.nodeSelector }}
216 {{ toYaml .Values.nodeSelector | indent 10 }}
218 {{- if .Values.affinity }}
220 {{ toYaml .Values.affinity | indent 10 }}
223 # side car containers
224 - name: filebeat-onap
225 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
226 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
228 - mountPath: /usr/share/filebeat/filebeat.yml
230 subPath: filebeat.yml
231 - mountPath: /var/log/onap
233 - mountPath: /usr/share/filebeat/data
236 - name: "{{ include "common.namespace" . }}-docker-registry-key"
243 - name: data-filebeat
245 - name: filebeat-conf
247 name: {{ include "common.fullname" . }}-filebeat-configmap
248 - name: sdnc-logging-cfg-config
250 name: {{ include "common.fullname" . }}-log-configmap
253 name: {{ include "common.fullname" . }}-bin
257 name: {{ include "common.fullname" . }}-properties
262 {{ if not .Values.persistence.enabled }}
263 - name: {{ include "common.fullname" . }}-data
266 {{ include "common.certInitializer.volumes" . | nindent 8 }}
267 volumeClaimTemplates:
269 name: {{ include "common.fullname" . }}-data
271 name: {{ include "common.fullname" . }}
272 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
273 release: "{{ include "common.release" . }}"
274 heritage: "{{ .Release.Service }}"
277 - {{ .Values.persistence.accessMode }}
278 storageClassName: {{ include "common.storageClass" . }}
281 storage: {{ .Values.persistence.size }}