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: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
26 serviceName: {{ include "common.servicename" . }}-cluster
27 replicas: {{ .Values.replicaCount }}
28 podManagementPolicy: Parallel
32 app: {{ include "common.name" . }}
33 release: {{ .Release.Name }}
40 - {{ .Values.config.mariadbGalera.chartName }}
46 fieldPath: metadata.namespace
47 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
48 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 name: {{ include "common.name" . }}-readiness
50 {{ if .Values.global.aafEnabled }}
51 - name: {{ include "common.name" . }}-aaf-readiness
52 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 fieldPath: metadata.namespace
65 - name: {{ include "common.name" . }}-aaf
66 image: {{ .Values.global.repository }}/{{ .Values.aaf_init.agentImage }}
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 - mountPath: {{ .Values.certpersistence.certPath }}
70 name: {{ include "common.fullname" . }}-certs
75 /opt/app/aaf_config/bin/agent.sh &&
76 cd /opt/app/osaaf/local &&
77 /opt/app/aaf_config/bin/agent.sh local showpass | grep cadi_keystore_password= | cut -d= -f 2 > /opt/app/osaaf/local/.pass 2>&1
80 value: "{{ .Values.aaf_init.fqi }}"
81 - name: aaf_locate_url
82 value: "https://aaf-locate.{{ .Release.Namespace}}:8095"
83 - name: aaf_locator_container
85 - name: aaf_locator_container_ns
86 value: "{{ .Release.Namespace }}"
87 - name: aaf_locator_fqdn
88 value: "{{ .Values.aaf_init.fqdn }}"
89 - name: aaf_locator_app_ns
90 value: "{{ .Values.aaf_init.app_ns }}"
92 value: "{{ .Values.aaf_init.deploy_fqi }}"
93 - name: DEPLOY_PASSWORD
96 name: {{ template "common.fullname" .}}-aaf
98 - name: cadi_longitude
99 value: "{{ .Values.aaf_init.cadi_longitude }}"
100 - name: cadi_latitude
101 value: "{{ .Values.aaf_init.cadi_latitude }}"
103 - name: {{ include "common.name" . }}-chown
105 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 }}"]
107 - mountPath: {{ .Values.persistence.mdsalPath }}
108 name: {{ include "common.fullname" . }}-data
109 - mountPath: {{ .Values.certpersistence.certPath }}
110 name: {{ include "common.fullname" . }}-certs
112 - name: {{ include "common.name" . }}
113 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
114 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
115 command: ["/bin/bash"]
116 args: ["-c", "/opt/sdnc/bin/startODL.sh"]
118 - containerPort: {{ .Values.service.internalPort }}
119 - containerPort: {{ .Values.service.internalPort2 }}
120 - containerPort: {{ .Values.service.internalPort3 }}
121 - containerPort: {{ .Values.service.clusterPort }}
124 port: {{ .Values.service.internalPort }}
125 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
126 periodSeconds: {{ .Values.readiness.periodSeconds }}
128 - name: MYSQL_ROOT_PASSWORD
131 name: {{ template "common.fullname" . }}
132 key: db-root-password
133 - name: ODL_ADMIN_PASSWORD
136 name: {{ template "common.fullname" . }}-odl
138 - name: SDNC_DB_PASSWORD
141 name: {{ template "common.fullname" . }}-sdnctl
142 key: db-sdnctl-password
143 - name: SDNC_CONFIG_DIR
144 value: "{{ .Values.config.configDir }}"
145 - name: ENABLE_ODL_CLUSTER
146 value: "{{ .Values.config.enableClustering }}"
147 - name: MY_ODL_CLUSTER
148 value: "{{ .Values.config.myODLCluster }}"
149 - name: PEER_ODL_CLUSTER
150 value: "{{ .Values.config.peerODLCluster }}"
151 - name: IS_PRIMARY_CLUSTER
152 value: "{{ .Values.config.isPrimaryCluster }}"
154 value: "{{ .Values.config.geoEnabled}}"
155 - name: SDNC_AAF_ENABLED
156 value: "{{ .Values.global.aafEnabled}}"
157 - name: SDNC_REPLICAS
158 value: "{{ .Values.replicaCount }}"
160 value: "{{.Values.config.mariadbGalera.serviceName}}.{{.Release.Namespace}}"
162 value: "{{ .Values.config.javaHome}}"
164 - mountPath: /etc/localtime
167 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
168 name: sdnc-logging-cfg-config
169 subPath: org.ops4j.pax.logging.cfg
170 - mountPath: {{ .Values.config.binDir }}/startODL.sh
173 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
175 subPath: installSdncDb.sh
176 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
178 subPath: aaiclient.properties
179 - mountPath: {{ .Values.config.configDir }}/dblib.properties
181 subPath: dblib.properties
182 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
184 subPath: lcm-dg.properties
185 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
187 subPath: svclogic.properties
188 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
190 subPath: svclogic.properties
191 - mountPath: {{ .Values.config.configDir }}/netbox.properties
193 subPath: netbox.properties
194 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
196 subPath: blueprints-processor-adaptor.properties
197 - mountPath: {{ .Values.persistence.mdsalPath }}
198 name: {{ include "common.fullname" . }}-data
199 - mountPath: /var/log/onap
201 - mountPath: {{ .Values.certpersistence.certPath }}
202 name: {{ include "common.fullname" . }}-certs
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
259 - name: {{ include "common.fullname" . }}-certs
260 {{ if .Values.certpersistence.enabled }}
261 persistentVolumeClaim:
262 claimName: {{ include "common.fullname" . }}-certs
266 {{ if not .Values.persistence.enabled }}
267 - name: {{ include "common.fullname" . }}-data
270 volumeClaimTemplates:
272 name: {{ include "common.fullname" . }}-data
274 name: {{ include "common.fullname" . }}
275 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
276 release: "{{ .Release.Name }}"
277 heritage: "{{ .Release.Service }}"
280 - {{ .Values.persistence.accessMode }}
281 storageClassName: {{ include "common.storageClass" . }}
284 storage: {{ .Values.persistence.size }}