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.
18 apiVersion: apps/v1beta1
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 }}
29 serviceName: {{ include "common.servicename" . }}-cluster
30 replicas: {{ .Values.replicaCount }}
31 podManagementPolicy: Parallel
35 app: {{ include "common.name" . }}
36 release: {{ include "common.release" . }}
43 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
45 - name: AAI_CLIENT_NAME
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
47 - name: AAI_CLIENT_PASSWORD
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
49 - name: MODELSERVICE_USER
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
51 - name: MODELSERVICE_PASSWORD
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
55 - name: RESTCONF_PASSWORD
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
59 - name: ANSIBLE_PASSWORD
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
63 - name: SCALEOUT_PASSWORD
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
69 - name: SDNC_DB_PASSWORD
70 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
72 - mountPath: /config-input
76 image: "{{ .Values.global.envsubstImage }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 name: {{ include "common.name" . }}-update-config
84 - {{ include "common.mariadbService" . }}
90 fieldPath: metadata.namespace
91 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 name: {{ include "common.name" . }}-readiness
94 {{ if .Values.global.aafEnabled }}
95 - name: {{ include "common.name" . }}-aaf-readiness
96 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 fieldPath: metadata.namespace
109 - name: {{ include "common.name" . }}-aaf
110 image: {{ .Values.global.repository }}/{{ .Values.aaf_init.agentImage }}
111 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
113 - mountPath: {{ .Values.certpersistence.certPath }}
114 name: {{ include "common.fullname" . }}-certs
119 /opt/app/aaf_config/bin/agent.sh &&
120 cd /opt/app/osaaf/local &&
121 /opt/app/aaf_config/bin/agent.sh local showpass | grep cadi_keystore_password= | cut -d= -f 2 > /opt/app/osaaf/local/.pass 2>&1
124 value: "{{ .Values.aaf_init.fqi }}"
125 - name: aaf_locate_url
126 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
127 - name: aaf_locator_container
129 - name: aaf_locator_container_ns
130 value: "{{ .Release.Namespace }}"
131 - name: aaf_locator_fqdn
132 value: "{{ .Values.aaf_init.fqdn }}"
133 - name: aaf_locator_app_ns
134 value: "{{ .Values.aaf_init.app_ns }}"
136 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "login") | indent 12 }}
137 - name: DEPLOY_PASSWORD
138 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "password") | indent 12 }}
139 - name: cadi_longitude
140 value: "{{ .Values.aaf_init.cadi_longitude }}"
141 - name: cadi_latitude
142 value: "{{ .Values.aaf_init.cadi_latitude }}"
144 - name: {{ include "common.name" . }}-chown
146 command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certpersistence.certPath }}"]
148 - mountPath: {{ .Values.persistence.mdsalPath }}
149 name: {{ include "common.fullname" . }}-data
150 - mountPath: {{ .Values.certpersistence.certPath }}
151 name: {{ include "common.fullname" . }}-certs
153 - name: {{ include "common.name" . }}
154 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
155 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
156 command: ["/bin/bash"]
157 args: ["-c", "/opt/sdnc/bin/startODL.sh"]
159 - containerPort: {{ .Values.service.internalPort }}
160 - containerPort: {{ .Values.service.internalPort2 }}
161 - containerPort: {{ .Values.service.internalPort3 }}
162 - containerPort: {{ .Values.service.clusterPort }}
165 port: {{ .Values.service.internalPort }}
166 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
167 periodSeconds: {{ .Values.readiness.periodSeconds }}
169 - name: MYSQL_ROOT_PASSWORD
170 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
171 - name: ODL_ADMIN_USERNAME
172 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
173 - name: ODL_ADMIN_PASSWORD
174 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
176 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
177 - name: SDNC_DB_PASSWORD
178 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
179 - name: SDNC_CONFIG_DIR
180 value: "{{ .Values.config.configDir }}"
181 - name: ENABLE_ODL_CLUSTER
182 value: "{{ .Values.config.enableClustering }}"
183 - name: MY_ODL_CLUSTER
184 value: "{{ .Values.config.myODLCluster }}"
185 - name: PEER_ODL_CLUSTER
186 value: "{{ .Values.config.peerODLCluster }}"
187 - name: IS_PRIMARY_CLUSTER
188 value: "{{ .Values.config.isPrimaryCluster }}"
190 value: "{{ .Values.config.geoEnabled}}"
191 - name: SDNC_AAF_ENABLED
192 value: "{{ .Values.global.aafEnabled}}"
193 - name: SDNC_REPLICAS
194 value: "{{ .Values.replicaCount }}"
196 value: {{ include "common.mariadbService" . }}
198 value: "{{ .Values.config.javaHome}}"
200 - mountPath: /etc/localtime
203 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
204 name: sdnc-logging-cfg-config
205 subPath: org.ops4j.pax.logging.cfg
206 - mountPath: {{ .Values.config.binDir }}/startODL.sh
209 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
211 subPath: installSdncDb.sh
212 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
214 subPath: aaiclient.properties
215 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
217 subPath: aaiclient.properties
218 - mountPath: {{ .Values.config.configDir }}/dblib.properties
220 subPath: dblib.properties
221 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
223 subPath: lcm-dg.properties
224 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
226 subPath: svclogic.properties
227 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
229 subPath: svclogic.properties
230 - mountPath: {{ .Values.config.configDir }}/netbox.properties
232 subPath: netbox.properties
233 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
235 subPath: blueprints-processor-adaptor.properties
236 - mountPath: {{ .Values.persistence.mdsalPath }}
237 name: {{ include "common.fullname" . }}-data
238 - mountPath: /var/log/onap
240 - mountPath: {{ .Values.certpersistence.certPath }}
241 name: {{ include "common.fullname" . }}-certs
242 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
245 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
247 subPath: org.opendaylight.controller.cluster.datastore.cfg
248 - mountPath: {{ .Values.config.odl.binDir }}/setenv
252 {{ include "common.resources" . | indent 12 }}
253 {{- if .Values.nodeSelector }}
255 {{ toYaml .Values.nodeSelector | indent 10 }}
257 {{- if .Values.affinity }}
259 {{ toYaml .Values.affinity | indent 10 }}
262 # side car containers
263 - name: filebeat-onap
264 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
265 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
267 - mountPath: /usr/share/filebeat/filebeat.yml
269 subPath: filebeat.yml
270 - mountPath: /var/log/onap
272 - mountPath: /usr/share/filebeat/data
275 - name: "{{ include "common.namespace" . }}-docker-registry-key"
282 - name: data-filebeat
284 - name: filebeat-conf
286 name: {{ include "common.fullname" . }}-filebeat-configmap
287 - name: sdnc-logging-cfg-config
289 name: {{ include "common.fullname" . }}-log-configmap
292 name: {{ include "common.fullname" . }}-bin
296 name: {{ include "common.fullname" . }}-properties
301 - name: {{ include "common.fullname" . }}-certs
302 {{ if .Values.certpersistence.enabled }}
303 persistentVolumeClaim:
304 claimName: {{ include "common.fullname" . }}-certs
308 {{ if not .Values.persistence.enabled }}
309 - name: {{ include "common.fullname" . }}-data
312 volumeClaimTemplates:
314 name: {{ include "common.fullname" . }}-data
316 name: {{ include "common.fullname" . }}
317 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
318 release: "{{ include "common.release" . }}"
319 heritage: "{{ .Release.Service }}"
322 - {{ .Values.persistence.accessMode }}
323 storageClassName: {{ include "common.storageClass" . }}
326 storage: {{ .Values.persistence.size }}