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.
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 }}
31 app: {{ include "common.name" . }}
32 serviceName: {{ include "common.servicename" . }}-cluster
33 replicas: {{ .Values.replicaCount }}
34 podManagementPolicy: Parallel
38 app: {{ include "common.name" . }}
39 release: {{ include "common.release" . }}
46 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
48 - name: AAI_CLIENT_NAME
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
50 - name: AAI_CLIENT_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
52 - name: MODELSERVICE_USER
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
54 - name: MODELSERVICE_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
58 - name: RESTCONF_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
62 - name: ANSIBLE_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
66 - name: SCALEOUT_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
72 - name: SDNC_DB_PASSWORD
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
75 - mountPath: /config-input
79 image: "{{ .Values.global.envsubstImage }}"
80 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 name: {{ include "common.name" . }}-update-config
87 - {{ include "common.mariadbService" . }}
93 fieldPath: metadata.namespace
94 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 name: {{ include "common.name" . }}-readiness
98 {{ include "common.certInitializer.initContainer" . | indent 6 }}
100 - name: {{ include "common.name" . }}-chown
102 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 }}"]
104 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
105 - mountPath: {{ .Values.persistence.mdsalPath }}
106 name: {{ include "common.fullname" . }}-data
108 - name: {{ include "common.name" . }}
109 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
110 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
111 command: ["/bin/bash"]
112 args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
114 - containerPort: {{ .Values.service.internalPort }}
115 - containerPort: {{ .Values.service.internalPort2 }}
116 - containerPort: {{ .Values.service.internalPort3 }}
117 - containerPort: {{ .Values.service.clusterPort }}
120 port: {{ .Values.service.internalPort }}
121 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
122 periodSeconds: {{ .Values.readiness.periodSeconds }}
124 - name: MYSQL_ROOT_PASSWORD
125 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
126 - name: ODL_ADMIN_USERNAME
127 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
128 - name: ODL_ADMIN_PASSWORD
129 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
131 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
132 - name: SDNC_DB_PASSWORD
133 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
134 - name: SDNC_CONFIG_DIR
135 value: "{{ .Values.config.configDir }}"
136 - name: ENABLE_ODL_CLUSTER
137 value: "{{ .Values.config.enableClustering }}"
138 - name: MY_ODL_CLUSTER
139 value: "{{ .Values.config.myODLCluster }}"
140 - name: PEER_ODL_CLUSTER
141 value: "{{ .Values.config.peerODLCluster }}"
142 - name: IS_PRIMARY_CLUSTER
143 value: "{{ .Values.config.isPrimaryCluster }}"
145 value: "{{ .Values.config.geoEnabled}}"
146 - name: SDNC_AAF_ENABLED
147 value: "{{ .Values.global.aafEnabled}}"
148 - name: SDNC_REPLICAS
149 value: "{{ .Values.replicaCount }}"
151 value: {{ include "common.mariadbService" . }}
153 value: "{{ .Values.config.javaHome}}"
155 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
156 - mountPath: /etc/localtime
159 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
160 name: sdnc-logging-cfg-config
161 subPath: org.ops4j.pax.logging.cfg
162 - mountPath: {{ .Values.config.binDir }}/startODL.sh
165 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
167 subPath: installSdncDb.sh
168 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
170 subPath: aaiclient.properties
171 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
173 subPath: aaiclient.properties
174 - mountPath: {{ .Values.config.configDir }}/dblib.properties
176 subPath: dblib.properties
177 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
179 subPath: lcm-dg.properties
180 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
182 subPath: svclogic.properties
183 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
185 subPath: svclogic.properties
186 - mountPath: {{ .Values.config.configDir }}/netbox.properties
188 subPath: netbox.properties
189 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
191 subPath: blueprints-processor-adaptor.properties
192 - mountPath: {{ .Values.persistence.mdsalPath }}
193 name: {{ include "common.fullname" . }}-data
194 - mountPath: /var/log/onap
196 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
199 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
201 subPath: org.opendaylight.controller.cluster.datastore.cfg
202 - mountPath: {{ .Values.config.odl.binDir }}/setenv
206 {{ include "common.resources" . | indent 12 }}
207 {{- if .Values.nodeSelector }}
209 {{ toYaml .Values.nodeSelector | indent 10 }}
211 {{- if .Values.affinity }}
213 {{ toYaml .Values.affinity | indent 10 }}
216 # side car containers
217 - name: filebeat-onap
218 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
219 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
221 - mountPath: /usr/share/filebeat/filebeat.yml
223 subPath: filebeat.yml
224 - mountPath: /var/log/onap
226 - mountPath: /usr/share/filebeat/data
229 - name: "{{ include "common.namespace" . }}-docker-registry-key"
236 - name: data-filebeat
238 - name: filebeat-conf
240 name: {{ include "common.fullname" . }}-filebeat-configmap
241 - name: sdnc-logging-cfg-config
243 name: {{ include "common.fullname" . }}-log-configmap
246 name: {{ include "common.fullname" . }}-bin
250 name: {{ include "common.fullname" . }}-properties
255 {{ if not .Values.persistence.enabled }}
256 - name: {{ include "common.fullname" . }}-data
259 {{ include "common.certInitializer.volumes" . | nindent 8 }}
260 volumeClaimTemplates:
262 name: {{ include "common.fullname" . }}-data
264 name: {{ include "common.fullname" . }}
265 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
266 release: "{{ include "common.release" . }}"
267 heritage: "{{ .Release.Service }}"
270 - {{ .Values.persistence.accessMode }}
271 storageClassName: {{ include "common.storageClass" . }}
274 storage: {{ .Values.persistence.size }}