2 # Copyright © 2017 Amdocs, Bell Canada
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 apiVersion: apps/v1beta1
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25 release: {{ include "common.release" . }}
26 heritage: {{ .Release.Service }}
28 serviceName: {{ include "common.servicename" . }}-cluster
29 replicas: {{ .Values.replicaCount }}
30 podManagementPolicy: Parallel
34 app: {{ include "common.name" . }}
35 release: {{ include "common.release" . }}
42 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
44 - name: AAI_CLIENT_NAME
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
46 - name: AAI_CLIENT_PASSWORD
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
48 - name: MODELSERVICE_USER
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
50 - name: MODELSERVICE_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
54 - name: RESTCONF_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
58 - name: ANSIBLE_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
62 - name: SCALEOUT_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
68 - name: SDNC_DB_PASSWORD
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
71 - mountPath: /config-input
75 image: "{{ .Values.global.envsubstImage }}"
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: {{ include "common.name" . }}-update-config
83 - {{ include "common.mariadbService" . }}
89 fieldPath: metadata.namespace
90 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
91 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
92 name: {{ include "common.name" . }}-readiness
93 {{ if .Values.global.aafEnabled }}
94 - name: {{ include "common.name" . }}-aaf-readiness
95 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
107 fieldPath: metadata.namespace
108 - name: {{ include "common.name" . }}-aaf
109 image: {{ .Values.global.repository }}/{{ .Values.aaf_init.agentImage }}
110 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
112 - mountPath: {{ .Values.certpersistence.certPath }}
113 name: {{ include "common.fullname" . }}-certs
118 /opt/app/aaf_config/bin/agent.sh &&
119 cd /opt/app/osaaf/local &&
120 /opt/app/aaf_config/bin/agent.sh local showpass | grep cadi_keystore_password= | cut -d= -f 2 > /opt/app/osaaf/local/.pass 2>&1
123 value: "{{ .Values.aaf_init.fqi }}"
124 - name: aaf_locate_url
125 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
126 - name: aaf_locator_container
128 - name: aaf_locator_container_ns
129 value: "{{ .Release.Namespace }}"
130 - name: aaf_locator_fqdn
131 value: "{{ .Values.aaf_init.fqdn }}"
132 - name: aaf_locator_app_ns
133 value: "{{ .Values.aaf_init.app_ns }}"
135 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "login") | indent 12 }}
136 - name: DEPLOY_PASSWORD
137 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aaf-creds" "key" "password") | indent 12 }}
138 - name: cadi_longitude
139 value: "{{ .Values.aaf_init.cadi_longitude }}"
140 - name: cadi_latitude
141 value: "{{ .Values.aaf_init.cadi_latitude }}"
143 - name: {{ include "common.name" . }}-chown
145 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 }}"]
147 - mountPath: {{ .Values.persistence.mdsalPath }}
148 name: {{ include "common.fullname" . }}-data
149 - mountPath: {{ .Values.certpersistence.certPath }}
150 name: {{ include "common.fullname" . }}-certs
152 - name: {{ include "common.name" . }}
153 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
154 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
155 command: ["/bin/bash"]
156 args: ["-c", "/opt/sdnc/bin/startODL.sh"]
158 - containerPort: {{ .Values.service.internalPort }}
159 - containerPort: {{ .Values.service.internalPort2 }}
160 - containerPort: {{ .Values.service.internalPort3 }}
161 - containerPort: {{ .Values.service.clusterPort }}
164 port: {{ .Values.service.internalPort }}
165 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
166 periodSeconds: {{ .Values.readiness.periodSeconds }}
168 - name: MYSQL_ROOT_PASSWORD
169 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
170 - name: ODL_ADMIN_USERNAME
171 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
172 - name: ODL_ADMIN_PASSWORD
173 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
175 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
176 - name: SDNC_DB_PASSWORD
177 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
178 - name: SDNC_CONFIG_DIR
179 value: "{{ .Values.config.configDir }}"
180 - name: ENABLE_ODL_CLUSTER
181 value: "{{ .Values.config.enableClustering }}"
182 - name: MY_ODL_CLUSTER
183 value: "{{ .Values.config.myODLCluster }}"
184 - name: PEER_ODL_CLUSTER
185 value: "{{ .Values.config.peerODLCluster }}"
186 - name: IS_PRIMARY_CLUSTER
187 value: "{{ .Values.config.isPrimaryCluster }}"
189 value: "{{ .Values.config.geoEnabled}}"
190 - name: SDNC_AAF_ENABLED
191 value: "{{ .Values.global.aafEnabled}}"
192 - name: SDNC_REPLICAS
193 value: "{{ .Values.replicaCount }}"
195 value: {{ include "common.mariadbService" . }}
197 value: "{{ .Values.config.javaHome}}"
199 - mountPath: /etc/localtime
202 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
203 name: sdnc-logging-cfg-config
204 subPath: org.ops4j.pax.logging.cfg
205 - mountPath: {{ .Values.config.binDir }}/startODL.sh
208 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
210 subPath: installSdncDb.sh
211 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
213 subPath: aaiclient.properties
214 - mountPath: {{ .Values.config.configDir }}/dblib.properties
216 subPath: dblib.properties
217 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
219 subPath: lcm-dg.properties
220 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
222 subPath: svclogic.properties
223 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
225 subPath: svclogic.properties
226 - mountPath: {{ .Values.config.configDir }}/netbox.properties
228 subPath: netbox.properties
229 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
231 subPath: blueprints-processor-adaptor.properties
232 - mountPath: {{ .Values.persistence.mdsalPath }}
233 name: {{ include "common.fullname" . }}-data
234 - mountPath: /var/log/onap
236 - mountPath: {{ .Values.certpersistence.certPath }}
237 name: {{ include "common.fullname" . }}-certs
238 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
241 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
243 subPath: org.opendaylight.controller.cluster.datastore.cfg
244 - mountPath: {{ .Values.config.odl.binDir }}/setenv
248 {{ include "common.resources" . | indent 12 }}
249 {{- if .Values.nodeSelector }}
251 {{ toYaml .Values.nodeSelector | indent 10 }}
253 {{- if .Values.affinity }}
255 {{ toYaml .Values.affinity | indent 10 }}
258 # side car containers
259 - name: filebeat-onap
260 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
261 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
263 - mountPath: /usr/share/filebeat/filebeat.yml
265 subPath: filebeat.yml
266 - mountPath: /var/log/onap
268 - mountPath: /usr/share/filebeat/data
271 - name: "{{ include "common.namespace" . }}-docker-registry-key"
278 - name: data-filebeat
280 - name: filebeat-conf
282 name: {{ include "common.fullname" . }}-filebeat-configmap
283 - name: sdnc-logging-cfg-config
285 name: {{ include "common.fullname" . }}-log-configmap
288 name: {{ include "common.fullname" . }}-bin
292 name: {{ include "common.fullname" . }}-properties
297 - name: {{ include "common.fullname" . }}-certs
298 {{ if .Values.certpersistence.enabled }}
299 persistentVolumeClaim:
300 claimName: {{ include "common.fullname" . }}-certs
304 {{ if not .Values.persistence.enabled }}
305 - name: {{ include "common.fullname" . }}-data
308 volumeClaimTemplates:
310 name: {{ include "common.fullname" . }}-data
312 name: {{ include "common.fullname" . }}
313 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
314 release: "{{ include "common.release" . }}"
315 heritage: "{{ .Release.Service }}"
318 - {{ .Values.persistence.accessMode }}
319 storageClassName: {{ include "common.storageClass" . }}
322 storage: {{ .Values.persistence.size }}