Merge "[SDNC] Add Ves collector config"
[oom.git] / kubernetes / sdnc / templates / statefulset.yaml
1 {{/*
2 # Copyright © 2020 Samsung Electronics
3 # Copyright © 2017 Amdocs, Bell Canada
4 # Copyright © 2021 Nokia
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 */}}
18
19 apiVersion: apps/v1
20 kind: StatefulSet
21 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 spec:
23   selector:
24     matchLabels:
25       app: {{ include "common.name" . }}
26   serviceName: {{ include "common.servicename" . }}-cluster
27   replicas: {{ .Values.replicaCount }}
28   selector: {{- include "common.selectors" . | nindent 4 }}
29   podManagementPolicy: Parallel
30   template:
31     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
32     spec:
33       initContainers:
34       - command:
35         - sh
36         args:
37         - -c
38         - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
39         env:
40         - name: AAI_CLIENT_NAME
41           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
42         - name: AAI_CLIENT_PASSWORD
43           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
44         - name: AAI_TRUSTSTORE_PASSWORD
45           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 10 }}
46         - name: ANSIBLE_TRUSTSTORE_PASSWORD
47           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 10 }}
48         - name: SO_USER
49           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 10 }}
50         - name: SO_PASSWORD
51           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 10 }}
52         - name: NENG_USER
53           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 10 }}
54         - name: NENG_PASSWORD
55           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 10 }}
56         - name: CDS_USER
57           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 10 }}
58         - name: CDS_PASSWORD
59           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 10 }}
60         - name: HONEYCOMB_USER
61           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 10 }}
62         - name: HONEYCOMB_PASSWORD
63           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 10 }}
64         - name: TRUSTSTORE_PASSWORD
65           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 10 }}
66         - name: KEYSTORE_PASSWORD
67           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
68         - name: DMAAP_USER
69           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 10 }}
70         - name: DMAAP_PASSWORD
71           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 10 }}
72         - name: DMAAP_AUTHKEY
73           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 10 }}
74         - name: MODELSERVICE_USER
75           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
76         - name: MODELSERVICE_PASSWORD
77           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
78         - name: RESTCONF_USER
79           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
80         - name: RESTCONF_PASSWORD
81           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
82         - name: ANSIBLE_USER
83           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
84         - name: ANSIBLE_PASSWORD
85           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
86         - name: SCALEOUT_USER
87           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
88         - name: SCALEOUT_PASSWORD
89           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
90         - name: NETBOX_APIKEY
91           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
92         - name: SDNC_DB_USER
93           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
94         - name: SDNC_DB_PASSWORD
95           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
96         - name: MYSQL_USER
97           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
98         - name: MYSQL_PASSWORD
99           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
100         - name: ODL_ADMIN_USERNAME
101           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
102         - name: ODL_USER
103           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
104         - name: ODL_ADMIN_PASSWORD
105           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
106         - name: ODL_PASSWORD
107           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
108         {{ if and .Values.config.sdnr.dmaapProxy.enabled  .Values.config.sdnr.dmaapProxy.usepwd }}
109         - name: DMAAP_HTTP_PROXY_USERNAME
110           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
111         - name: DMAAP_HTTP_PROXY_PASSWORD
112           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
113         {{- end }}
114         {{ if .Values.config.sdnr.oauth.enabled }}
115         - name: OAUTH_TOKEN_SECRET
116           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oauth-token-secret" "key" "password") | indent 10 }}
117         - name: KEYCLOAK_SECRET
118           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keycloak-secret" "key" "password") | indent 10 }}
119
120         - name: ENABLE_ODLUX_RBAC
121           value: "{{ .Values.config.sdnr.oauth.odluxRbac.enabled | default "true" }}"
122         {{ end }}
123
124         volumeMounts:
125         - mountPath: /config-input
126           name: config-input
127         - mountPath: /config
128           name: properties
129         image: {{ include "repositoryGenerator.image.envsubst" . }}
130         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
131         name: {{ include "common.name" . }}-update-config
132       {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
133       - command:
134         - /app/ready.py
135         args:
136         {{ if .Values.dgbuilder.enabled -}}
137         - --container-name
138         - {{ include "common.mariadbService" . }}
139         - --job-name
140         - {{ include "common.fullname" . }}-dbinit-job
141         {{ end -}}
142         {{ if .Values.config.sdnr.enabled -}}
143         - --job-name
144         - {{ include "common.fullname" . }}-sdnrdb-init-job
145         {{ end -}}
146         env:
147         - name: NAMESPACE
148           valueFrom:
149             fieldRef:
150               apiVersion: v1
151               fieldPath: metadata.namespace
152         image: {{ include "repositoryGenerator.image.readiness" . }}
153         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
154         name: {{ include "common.name" . }}-readiness
155         {{ end -}}
156 {{ include "common.certInitializer.initContainer" . | indent 6 }}
157       - name: {{ include "common.name" . }}-chown
158         image: {{ include "repositoryGenerator.image.busybox" . }}
159         command:
160         - sh
161         args:
162         - -c
163         - |
164            mkdir {{ .Values.persistence.mdsalPath }}/journal
165            mkdir {{ .Values.persistence.mdsalPath }}/snapshots
166            mkdir {{ .Values.persistence.mdsalPath }}/daexim
167            chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
168 {{- if .Values.global.aafEnabled }}
169            chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
170 {{- end }}
171         volumeMounts:
172 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
173           - mountPath: {{ .Values.persistence.mdsalPath }}
174             name: {{ include "common.fullname" . }}-data
175       containers:
176         - name: {{ include "common.name" . }}
177           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
178           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
179           {{- if .Values.global.cmpv2Enabled }}
180           {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
181           lifecycle:
182             postStart:
183               exec:
184                 command: ["sh", "-c", {{$linkCommand | quote}} ]
185           {{- end }}
186           command: ["/bin/bash"]
187           args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
188           ports:
189           - containerPort: {{ .Values.service.internalPort }}
190           - containerPort: {{ .Values.service.internalPort2 }}
191           - containerPort: {{ .Values.service.internalPort3 }}
192           - containerPort: {{ .Values.service.clusterPort }}
193           {{- if .Values.config.sdnr.netconfCallHome.enabled }}
194           - containerPort: {{ .Values.service.callHomePort }}
195           {{- end }}
196           readinessProbe:
197             tcpSocket:
198               port: {{ .Values.service.internalPort }}
199             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
200             periodSeconds: {{ .Values.readiness.periodSeconds }}
201           env:
202           {{ if and .Values.config.sdnr.enabled .Values.config.sdnr.sdnronly -}}
203           - name: MYSQL_ROOT_PASSWORD
204             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
205           {{ end -}}
206           - name: ODL_ADMIN_USERNAME
207             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
208           - name: ODL_USER
209             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
210           - name: ODL_ADMIN_PASSWORD
211             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
212           - name: ODL_PASSWORD
213             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
214           - name: SDNC_DB_USER
215             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
216           - name: SDNC_DB_PASSWORD
217             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
218           - name: MYSQL_USER
219             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
220           - name: MYSQL_PASSWORD
221             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
222           - name: MYSQL_DATABASE
223             value: "{{ .Values.config.dbSdnctlDatabase }}"
224           - name: SDNC_CONFIG_DIR
225             value: "{{ .Values.config.configDir }}"
226           - name: AAI_CLIENT_NAME
227             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
228           - name: AAI_CLIENT_PASSWORD
229             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
230           - name: AAI_TRUSTSTORE_PASSWORD
231             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
232           - name: ANSIBLE_TRUSTSTORE_PASSWORD
233             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
234           - name: SO_USER
235             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
236           - name: SO_PASSWORD
237             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
238           - name: NENG_USER
239             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
240           - name: NENG_PASSWORD
241             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
242           - name: CDS_USER
243             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
244           - name: CDS_PASSWORD
245             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
246           - name: HONEYCOMB_USER
247             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
248           - name: HONEYCOMB_PASSWORD
249             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
250           - name: TRUSTSTORE_PASSWORD
251             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
252           - name: KEYSTORE_PASSWORD
253             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
254           - name: DMAAP_USER
255             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
256           - name: DMAAP_PASSWORD
257             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
258           - name: DMAAP_AUTHKEY
259             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
260           - name: ENABLE_ODL_CLUSTER
261             value: "{{ .Values.config.enableClustering }}"
262           - name: MY_ODL_CLUSTER
263             value: "{{ .Values.config.myODLCluster }}"
264           - name: PEER_ODL_CLUSTER
265             value: "{{ .Values.config.peerODLCluster }}"
266           - name: IS_PRIMARY_CLUSTER
267             value: "{{ .Values.config.isPrimaryCluster }}"
268           - name: GEO_ENABLED
269             value: "{{ .Values.config.geoEnabled}}"
270           - name: SDNC_AAF_ENABLED
271             value: "{{ .Values.global.aafEnabled}}"
272           - name: SDNC_REPLICAS
273             value: "{{ .Values.replicaCount }}"
274           - name: MYSQL_HOST
275             value: {{ include "common.mariadbService" . }}
276           - name: MDSAL_PATH
277             value: {{ .Values.persistence.mdsalPath }}
278           - name: DAEXIM_PATH
279             value: {{ .Values.persistence.daeximPath }}
280           - name: JOURNAL_PATH
281             value: {{ .Values.persistence.journalPath }}
282           - name: SNAPSHOTS_PATH
283             value: {{ .Values.persistence.snapshotsPath }}
284           - name: JAVA_HOME
285             value: "{{ .Values.config.javaHome}}"
286           - name: JAVA_OPTS
287             value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
288           - name: KARAF_CONSOLE_LOG_LEVEL
289             value: "{{ include "common.log.level" . }}"
290           - name: SDNRWT
291             value: "{{ .Values.config.sdnr.enabled | default "false"}}"
292           {{- if eq .Values.config.sdnr.mode "web" }}
293           - name: SDNRDM
294             value: "true"
295           {{- end }}
296           - name: SDNRONLY
297             value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
298           - name: SDNRDBURL
299             {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
300             value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
301           {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
302           - name: SDNRDBTRUSTALLCERTS
303             value: "true"
304           {{- end }}
305           {{- if .Values.global.cmpv2Enabled }}
306           - name: ODL_CERT_DIR
307             value: {{ (mustFirst (.Values.certificates)).mountPath }}
308           {{- end }}
309           - name: ENABLE_OAUTH
310             value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
311           - name: SDNR_NETCONF_CALLHOME_ENABLED
312             value: "{{ .Values.config.sdnr.netconfCallHome.enabled | default "false" }}"
313           - name: SDNR_VES_COLLECTOR_ENABLED
314             value: "{{ .Values.config.sdnr.vesCollector.enabled }}"
315           - name: SDNR_VES_COLLECTOR_TLS_ENABLED
316             value: "{{ .Values.config.sdnr.vesCollector.tls.enabled }}"
317           - name: SDNR_VES_COLLECTOR_TRUST_ALL_CERTS
318             value: "{{ .Values.config.sdnr.vesCollector.trustAllCertificates }}"
319           - name: SDNR_VES_COLLECTOR_IP
320             value: "{{ .Values.config.sdnr.vesCollector.address }}"
321           - name: SDNR_VES_COLLECTOR_PORT
322             value: "{{ .Values.config.sdnr.vesCollector.port }}"
323           - name: SDNR_VES_COLLECTOR_VERSION
324             value: "{{ .Values.config.sdnr.vesCollector.version | default "v7" }}"
325           - name: SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME
326             value: "{{ .Values.config.sdnr.vesCollector.reportingEntityName | default "ONAP SDN-R" }}"
327           - name: SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL
328             value: "{{ .Values.config.sdnr.vesCollector.eventLogMsgDetail | default "SHORT" }}"
329           - name: SDNR_VES_COLLECTOR_USERNAME
330             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "login") | indent 12 }}
331           - name: SDNR_VES_COLLECTOR_PASSWORD
332             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "password") | indent 12 }}
333
334           volumeMounts:
335 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
336 {{- if .Values.global.cmpv2Enabled }}
337 {{ include "common.certManager.volumeMounts" . | indent 10 }}
338 {{- end }}
339           - mountPath: /etc/localtime
340             name: localtime
341             readOnly: true
342           - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
343             name: sdnc-logging-cfg-config
344             subPath: org.ops4j.pax.logging.cfg
345           - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
346             name: bin
347             subPath: installSdncDb.sh
348           - mountPath: {{ .Values.config.binDir }}/createLinks.sh
349             name: bin
350             subPath: createLinks.sh
351           - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
352             name: properties
353             subPath: aaiclient.properties
354           - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
355             name: properties
356             subPath: aaiclient.properties
357           - mountPath: {{ .Values.config.configDir }}/dblib.properties
358             name: properties
359             subPath: dblib.properties
360           - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
361             name: properties
362             subPath: lcm-dg.properties
363           - mountPath: {{ .Values.config.configDir }}/svclogic.properties
364             name: properties
365             subPath: svclogic.properties
366           - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
367             name: properties
368             subPath: svclogic.properties
369           - mountPath: {{ .Values.config.configDir }}/netbox.properties
370             name: properties
371             subPath: netbox.properties
372           - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
373             name: properties
374             subPath: blueprints-processor-adaptor.properties
375           - mountPath: {{ .Values.persistence.mdsalPath }}
376             name: {{ include "common.fullname" . }}-data
377           - mountPath: {{ .Values.log.path }}
378             name: logs
379           - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
380             name: properties
381             subPath: akka.conf
382           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
383             name: properties
384             subPath: org.opendaylight.controller.cluster.datastore.cfg
385           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
386             name: properties
387             subPath: org.opendaylight.aaa.filterchain.cfg
388           - mountPath: {{ .Values.config.odl.binDir }}/setenv
389             name: properties
390             subPath: setenv
391           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
392             name: properties
393             subPath: mountpoint-registrar.properties
394           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
395             name: properties
396             subPath: mountpoint-state-provider.properties
397           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
398             name: properties
399             subPath: org.opendaylight.daexim.cfg
400           {{- if .Values.config.sdnr.oauth.enabled }}
401           - mountPath: {{ .Values.config.odl.etcDir }}/oauth-provider.config.json
402             name: properties
403             subPath: oauth-provider.config.json
404           {{ end }}
405           resources: {{ include "common.resources" . | nindent 12 }}
406         # side car containers
407         {{ include "common.log.sidecar" . | nindent 8 }}
408       {{- if .Values.nodeSelector }}
409       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
410       {{- end }}
411       {{- if .Values.affinity }}
412       affinity: {{ toYaml .Values.affinity | nindent 8 }}
413       {{- end }}
414       imagePullSecrets:
415       - name: "{{ include "common.namespace" . }}-docker-registry-key"
416       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
417       volumes:
418         - name: localtime
419           hostPath:
420             path: /etc/localtime
421         - name: logs
422           emptyDir: {}
423         {{ include "common.log.volumes" . | nindent 8 }}
424         - name: sdnc-logging-cfg-config
425           configMap:
426             name: {{ include "common.fullname" . }}-log-configmap
427         - name: bin
428           configMap:
429             name: {{ include "common.fullname" . }}-bin
430             defaultMode: 0755
431         - name: config-input
432           configMap:
433             name: {{ include "common.fullname" . }}-properties
434             defaultMode: 0644
435         - name: properties
436           emptyDir:
437             medium: Memory
438   {{ if not .Values.persistence.enabled }}
439         - name: {{ include "common.fullname" . }}-data
440           emptyDir: {}
441   {{ else }}
442 {{ include "common.certInitializer.volumes" . | nindent 8 }}
443 {{- if .Values.global.cmpv2Enabled }}
444 {{ include "common.certManager.volumes" . | nindent 8 }}
445 {{- end }}
446   volumeClaimTemplates:
447   - metadata:
448       name: {{ include "common.fullname" . }}-data
449       labels:
450         name: {{ include "common.fullname" . }}
451         chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
452         release: "{{ include "common.release" . }}"
453         heritage: "{{ .Release.Service }}"
454     spec:
455       accessModes:
456       - {{ .Values.persistence.accessMode }}
457       storageClassName: {{ include "common.storageClass" . }}
458       resources:
459         requests:
460           storage: {{ .Values.persistence.size }}
461   {{- end }}