1 # Copyright © 2017 Amdocs, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 apiVersion: apps/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ include "common.release" . }}
24 heritage: {{ .Release.Service }}
26 serviceName: {{ include "common.servicename" . }}-cluster
27 replicas: {{ .Values.replicaCount }}
28 podManagementPolicy: Parallel
32 app: {{ include "common.name" . }}
33 release: {{ include "common.release" . }}
40 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
42 - name: AAI_CLIENT_NAME
43 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
44 - name: AAI_CLIENT_PASSWORD
45 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
46 - name: MODELSERVICE_USER
47 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
48 - name: MODELSERVICE_PASSWORD
49 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
51 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
52 - name: RESTCONF_PASSWORD
53 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
55 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
56 - name: ANSIBLE_PASSWORD
57 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
59 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
60 - name: SCALEOUT_PASSWORD
61 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
63 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
66 - name: SDNC_DB_PASSWORD
67 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
69 - mountPath: /config-input
73 image: "{{ .Values.global.envsubstImage }}"
74 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
75 name: {{ include "common.name" . }}-update-config
81 - {{ include "common.mariadbService" . }}
87 fieldPath: metadata.namespace
88 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
89 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
90 name: {{ include "common.name" . }}-readiness
91 {{ if .Values.global.aafEnabled }}
92 - name: {{ include "common.name" . }}-aaf-readiness
93 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
105 fieldPath: metadata.namespace
106 - name: {{ include "common.name" . }}-aaf
107 image: {{ .Values.global.repository }}/{{ .Values.aaf_init.agentImage }}
108 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
110 - mountPath: {{ .Values.certpersistence.certPath }}
111 name: {{ include "common.fullname" . }}-certs
116 /opt/app/aaf_config/bin/agent.sh &&
117 cd /opt/app/osaaf/local &&
118 /opt/app/aaf_config/bin/agent.sh local showpass | grep cadi_keystore_password= | cut -d= -f 2 > /opt/app/osaaf/local/.pass 2>&1
121 value: "{{ .Values.aaf_init.fqi }}"
122 - name: aaf_locate_url
123 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
124 - name: aaf_locator_container
126 - name: aaf_locator_container_ns
127 value: "{{ .Release.Namespace }}"
128 - name: aaf_locator_fqdn
129 value: "{{ .Values.aaf_init.fqdn }}"
130 - name: aaf_locator_app_ns
131 value: "{{ .Values.aaf_init.app_ns }}"
133 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aaf-creds" "key" "login") | indent 12 }}
134 - name: DEPLOY_PASSWORD
135 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "aaf-creds" "key" "password") | indent 12 }}
136 - name: cadi_longitude
137 value: "{{ .Values.aaf_init.cadi_longitude }}"
138 - name: cadi_latitude
139 value: "{{ .Values.aaf_init.cadi_latitude }}"
141 - name: {{ include "common.name" . }}-chown
143 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 }}"]
145 - mountPath: {{ .Values.persistence.mdsalPath }}
146 name: {{ include "common.fullname" . }}-data
147 - mountPath: {{ .Values.certpersistence.certPath }}
148 name: {{ include "common.fullname" . }}-certs
150 - name: {{ include "common.name" . }}
151 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
152 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
153 command: ["/bin/bash"]
154 args: ["-c", "/opt/sdnc/bin/startODL.sh"]
156 - containerPort: {{ .Values.service.internalPort }}
157 - containerPort: {{ .Values.service.internalPort2 }}
158 - containerPort: {{ .Values.service.internalPort3 }}
159 - containerPort: {{ .Values.service.clusterPort }}
162 port: {{ .Values.service.internalPort }}
163 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
164 periodSeconds: {{ .Values.readiness.periodSeconds }}
166 - name: MYSQL_ROOT_PASSWORD
167 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
168 - name: ODL_ADMIN_USERNAME
169 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
170 - name: ODL_ADMIN_PASSWORD
171 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
173 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
174 - name: SDNC_DB_PASSWORD
175 {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
176 - name: SDNC_CONFIG_DIR
177 value: "{{ .Values.config.configDir }}"
178 - name: ENABLE_ODL_CLUSTER
179 value: "{{ .Values.config.enableClustering }}"
180 - name: MY_ODL_CLUSTER
181 value: "{{ .Values.config.myODLCluster }}"
182 - name: PEER_ODL_CLUSTER
183 value: "{{ .Values.config.peerODLCluster }}"
184 - name: IS_PRIMARY_CLUSTER
185 value: "{{ .Values.config.isPrimaryCluster }}"
187 value: "{{ .Values.config.geoEnabled}}"
188 - name: SDNC_AAF_ENABLED
189 value: "{{ .Values.global.aafEnabled}}"
190 - name: SDNC_REPLICAS
191 value: "{{ .Values.replicaCount }}"
193 value: {{ include "common.mariadbService" . }}
195 value: "{{ .Values.config.javaHome}}"
197 - mountPath: /etc/localtime
200 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
201 name: sdnc-logging-cfg-config
202 subPath: org.ops4j.pax.logging.cfg
203 - mountPath: {{ .Values.config.binDir }}/startODL.sh
206 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
208 subPath: installSdncDb.sh
209 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
211 subPath: aaiclient.properties
212 - mountPath: {{ .Values.config.configDir }}/dblib.properties
214 subPath: dblib.properties
215 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
217 subPath: lcm-dg.properties
218 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
220 subPath: svclogic.properties
221 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
223 subPath: svclogic.properties
224 - mountPath: {{ .Values.config.configDir }}/netbox.properties
226 subPath: netbox.properties
227 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
229 subPath: blueprints-processor-adaptor.properties
230 - mountPath: {{ .Values.persistence.mdsalPath }}
231 name: {{ include "common.fullname" . }}-data
232 - mountPath: /var/log/onap
234 - mountPath: {{ .Values.certpersistence.certPath }}
235 name: {{ include "common.fullname" . }}-certs
236 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
239 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
241 subPath: org.opendaylight.controller.cluster.datastore.cfg
242 - mountPath: {{ .Values.config.odl.binDir }}/setenv
246 {{ include "common.resources" . | indent 12 }}
247 {{- if .Values.nodeSelector }}
249 {{ toYaml .Values.nodeSelector | indent 10 }}
251 {{- if .Values.affinity }}
253 {{ toYaml .Values.affinity | indent 10 }}
256 # side car containers
257 - name: filebeat-onap
258 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
259 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
261 - mountPath: /usr/share/filebeat/filebeat.yml
263 subPath: filebeat.yml
264 - mountPath: /var/log/onap
266 - mountPath: /usr/share/filebeat/data
269 - name: "{{ include "common.namespace" . }}-docker-registry-key"
276 - name: data-filebeat
278 - name: filebeat-conf
280 name: {{ include "common.fullname" . }}-filebeat-configmap
281 - name: sdnc-logging-cfg-config
283 name: {{ include "common.fullname" . }}-log-configmap
286 name: {{ include "common.fullname" . }}-bin
290 name: {{ include "common.fullname" . }}-properties
295 - name: {{ include "common.fullname" . }}-certs
296 {{ if .Values.certpersistence.enabled }}
297 persistentVolumeClaim:
298 claimName: {{ include "common.fullname" . }}-certs
302 {{ if not .Values.persistence.enabled }}
303 - name: {{ include "common.fullname" . }}-data
306 volumeClaimTemplates:
308 name: {{ include "common.fullname" . }}-data
310 name: {{ include "common.fullname" . }}
311 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
312 release: "{{ include "common.release" . }}"
313 heritage: "{{ .Release.Service }}"
316 - {{ .Values.persistence.accessMode }}
317 storageClassName: {{ include "common.storageClass" . }}
320 storage: {{ .Values.persistence.size }}