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
95 {{ include "common.certInitializer.initContainer" . | indent 6 }}
97 - name: {{ include "common.name" . }}-chown
99 command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}"]
101 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
102 - mountPath: {{ .Values.persistence.mdsalPath }}
103 name: {{ include "common.fullname" . }}-data
105 - name: {{ include "common.name" . }}
106 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
107 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 command: ["/bin/bash"]
109 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
111 - containerPort: {{ .Values.service.internalPort }}
112 - containerPort: {{ .Values.service.internalPort2 }}
113 - containerPort: {{ .Values.service.internalPort3 }}
114 - containerPort: {{ .Values.service.clusterPort }}
117 port: {{ .Values.service.internalPort }}
118 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
119 periodSeconds: {{ .Values.readiness.periodSeconds }}
121 - name: MYSQL_ROOT_PASSWORD
122 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
123 - name: ODL_ADMIN_USERNAME
124 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
125 - name: ODL_ADMIN_PASSWORD
126 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
128 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
129 - name: SDNC_DB_PASSWORD
130 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
131 - name: SDNC_CONFIG_DIR
132 value: "{{ .Values.config.configDir }}"
133 - name: ENABLE_ODL_CLUSTER
134 value: "{{ .Values.config.enableClustering }}"
135 - name: MY_ODL_CLUSTER
136 value: "{{ .Values.config.myODLCluster }}"
137 - name: PEER_ODL_CLUSTER
138 value: "{{ .Values.config.peerODLCluster }}"
139 - name: IS_PRIMARY_CLUSTER
140 value: "{{ .Values.config.isPrimaryCluster }}"
142 value: "{{ .Values.config.geoEnabled}}"
143 - name: SDNC_AAF_ENABLED
144 value: "{{ .Values.global.aafEnabled}}"
145 - name: SDNC_REPLICAS
146 value: "{{ .Values.replicaCount }}"
148 value: {{ include "common.mariadbService" . }}
150 value: "{{ .Values.config.javaHome}}"
151 - name: KARAF_CONSOLE_LOG_LEVEL
152 value: "{{ include "common.log.level" . }}"
154 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
155 - mountPath: /etc/localtime
158 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
159 name: sdnc-logging-cfg-config
160 subPath: org.ops4j.pax.logging.cfg
161 - mountPath: {{ .Values.config.binDir }}/startODL.sh
164 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
166 subPath: installSdncDb.sh
167 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
169 subPath: aaiclient.properties
170 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
172 subPath: aaiclient.properties
173 - mountPath: {{ .Values.config.configDir }}/dblib.properties
175 subPath: dblib.properties
176 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
178 subPath: lcm-dg.properties
179 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
181 subPath: svclogic.properties
182 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
184 subPath: svclogic.properties
185 - mountPath: {{ .Values.config.configDir }}/netbox.properties
187 subPath: netbox.properties
188 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
190 subPath: blueprints-processor-adaptor.properties
191 - mountPath: {{ .Values.persistence.mdsalPath }}
192 name: {{ include "common.fullname" . }}-data
193 - mountPath: /var/log/onap
195 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
198 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
200 subPath: org.opendaylight.controller.cluster.datastore.cfg
201 - mountPath: {{ .Values.config.odl.binDir }}/setenv
205 {{ include "common.resources" . | indent 12 }}
206 {{- if .Values.nodeSelector }}
208 {{ toYaml .Values.nodeSelector | indent 10 }}
210 {{- if .Values.affinity }}
212 {{ toYaml .Values.affinity | indent 10 }}
215 # side car containers
216 - name: filebeat-onap
217 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
218 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
220 - mountPath: /usr/share/filebeat/filebeat.yml
222 subPath: filebeat.yml
223 - mountPath: /var/log/onap
225 - mountPath: /usr/share/filebeat/data
228 - name: "{{ include "common.namespace" . }}-docker-registry-key"
235 - name: data-filebeat
237 - name: filebeat-conf
239 name: {{ include "common.fullname" . }}-filebeat-configmap
240 - name: sdnc-logging-cfg-config
242 name: {{ include "common.fullname" . }}-log-configmap
245 name: {{ include "common.fullname" . }}-bin
249 name: {{ include "common.fullname" . }}-properties
254 {{ if not .Values.persistence.enabled }}
255 - name: {{ include "common.fullname" . }}-data
258 {{ include "common.certInitializer.volumes" . | nindent 8 }}
259 volumeClaimTemplates:
261 name: {{ include "common.fullname" . }}-data
263 name: {{ include "common.fullname" . }}
264 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
265 release: "{{ include "common.release" . }}"
266 heritage: "{{ .Release.Service }}"
269 - {{ .Values.persistence.accessMode }}
270 storageClassName: {{ include "common.storageClass" . }}
273 storage: {{ .Values.persistence.size }}