Merge "[SDNC] Enable SDNC to use external oauth provider"
[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
125         volumeMounts:
126         - mountPath: /config-input
127           name: config-input
128         - mountPath: /config
129           name: properties
130         image: {{ include "repositoryGenerator.image.envsubst" . }}
131         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
132         name: {{ include "common.name" . }}-update-config
133       {{ if .Values.dgbuilder.enabled -}}
134       - command:
135         - /app/ready.py
136         args:
137         {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
138         - --container-name
139         - {{ include "common.mariadbService" . }}
140         {{ end -}}
141         {{ if .Values.config.sdnr.enabled -}}
142         - --container-name
143         - {{ include "common.name" . }}-sdnrdb-init-job
144         {{ end -}}
145         env:
146         - name: NAMESPACE
147           valueFrom:
148             fieldRef:
149               apiVersion: v1
150               fieldPath: metadata.namespace
151         image: {{ include "repositoryGenerator.image.readiness" . }}
152         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
153         name: {{ include "common.name" . }}-readiness
154         {{ end -}}
155 {{ include "common.certInitializer.initContainer" . | indent 6 }}
156 {{ include "common.certServiceClient.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 and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
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           readinessProbe:
194             tcpSocket:
195               port: {{ .Values.service.internalPort }}
196             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
197             periodSeconds: {{ .Values.readiness.periodSeconds }}
198           env:
199           - name: MYSQL_ROOT_PASSWORD
200             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
201           - name: ODL_ADMIN_USERNAME
202             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
203           - name: ODL_USER
204             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
205           - name: ODL_ADMIN_PASSWORD
206             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
207           - name: ODL_PASSWORD
208             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
209           - name: SDNC_DB_USER
210             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
211           - name: SDNC_DB_PASSWORD
212             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
213           - name: MYSQL_USER
214             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
215           - name: MYSQL_PASSWORD
216             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
217           - name: MYSQL_DATABASE
218             value: "{{ .Values.config.dbSdnctlDatabase }}"
219           - name: SDNC_CONFIG_DIR
220             value: "{{ .Values.config.configDir }}"
221           - name: AAI_CLIENT_NAME
222             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
223           - name: AAI_CLIENT_PASSWORD
224             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
225           - name: AAI_TRUSTSTORE_PASSWORD
226             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
227           - name: ANSIBLE_TRUSTSTORE_PASSWORD
228             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
229           - name: SO_USER
230             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
231           - name: SO_PASSWORD
232             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
233           - name: NENG_USER
234             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
235           - name: NENG_PASSWORD
236             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
237           - name: CDS_USER
238             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
239           - name: CDS_PASSWORD
240             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
241           - name: HONEYCOMB_USER
242             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
243           - name: HONEYCOMB_PASSWORD
244             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
245           - name: TRUSTSTORE_PASSWORD
246             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
247           - name: KEYSTORE_PASSWORD
248             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
249           - name: DMAAP_USER
250             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
251           - name: DMAAP_PASSWORD
252             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
253           - name: DMAAP_AUTHKEY
254             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
255           - name: ENABLE_ODL_CLUSTER
256             value: "{{ .Values.config.enableClustering }}"
257           - name: MY_ODL_CLUSTER
258             value: "{{ .Values.config.myODLCluster }}"
259           - name: PEER_ODL_CLUSTER
260             value: "{{ .Values.config.peerODLCluster }}"
261           - name: IS_PRIMARY_CLUSTER
262             value: "{{ .Values.config.isPrimaryCluster }}"
263           - name: GEO_ENABLED
264             value: "{{ .Values.config.geoEnabled}}"
265           - name: SDNC_AAF_ENABLED
266             value: "{{ .Values.global.aafEnabled}}"
267           - name: SDNC_REPLICAS
268             value: "{{ .Values.replicaCount }}"
269           - name: MYSQL_HOST
270             value: {{ include "common.mariadbService" . }}
271           - name: MDSAL_PATH
272             value: {{ .Values.persistence.mdsalPath }}
273           - name: DAEXIM_PATH
274             value: {{ .Values.persistence.daeximPath }}
275           - name: JOURNAL_PATH
276             value: {{ .Values.persistence.journalPath }}
277           - name: SNAPSHOTS_PATH
278             value: {{ .Values.persistence.snapshotsPath }}
279           - name: JAVA_HOME
280             value: "{{ .Values.config.javaHome}}"
281           - name: JAVA_OPTS
282             value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
283           - name: KARAF_CONSOLE_LOG_LEVEL
284             value: "{{ include "common.log.level" . }}"
285           - name: SDNRWT
286             value: "{{ .Values.config.sdnr.enabled | default "false"}}"
287           {{- if eq .Values.config.sdnr.mode "web" }}
288           - name: SDNRDM
289             value: "true"
290           {{- end }}
291           - name: SDNRONLY
292             value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
293           - name: SDNRDBURL
294             {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
295             value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
296           {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
297           - name: SDNRDBTRUSTALLCERTS
298             value: "true"
299           {{- end }}
300           {{- if .Values.global.cmpv2Enabled }}
301           - name: ODL_CERT_DIR
302             value: {{ (mustFirst (.Values.certificates)).mountPath }}
303           {{- end }}
304           - name: ENABLE_OAUTH
305             value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
306           volumeMounts:
307 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
308 {{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
309 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
310 {{ include "common.certManager.volumeMounts" . | indent 10 }}
311 {{- end }}
312           - mountPath: /etc/localtime
313             name: localtime
314             readOnly: true
315           - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
316             name: sdnc-logging-cfg-config
317             subPath: org.ops4j.pax.logging.cfg
318           - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
319             name: bin
320             subPath: installSdncDb.sh
321           - mountPath: {{ .Values.config.binDir }}/createLinks.sh
322             name: bin
323             subPath: createLinks.sh
324           - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
325             name: properties
326             subPath: aaiclient.properties
327           - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
328             name: properties
329             subPath: aaiclient.properties
330           - mountPath: {{ .Values.config.configDir }}/dblib.properties
331             name: properties
332             subPath: dblib.properties
333           - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
334             name: properties
335             subPath: lcm-dg.properties
336           - mountPath: {{ .Values.config.configDir }}/svclogic.properties
337             name: properties
338             subPath: svclogic.properties
339           - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
340             name: properties
341             subPath: svclogic.properties
342           - mountPath: {{ .Values.config.configDir }}/netbox.properties
343             name: properties
344             subPath: netbox.properties
345           - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
346             name: properties
347             subPath: blueprints-processor-adaptor.properties
348           - mountPath: {{ .Values.persistence.mdsalPath }}
349             name: {{ include "common.fullname" . }}-data
350           - mountPath: /var/log/onap
351             name: logs
352           - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
353             name: properties
354             subPath: akka.conf
355           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
356             name: properties
357             subPath: org.opendaylight.controller.cluster.datastore.cfg
358           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
359             name: properties
360             subPath: org.opendaylight.aaa.filterchain.cfg
361           - mountPath: {{ .Values.config.odl.binDir }}/setenv
362             name: properties
363             subPath: setenv
364           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
365             name: properties
366             subPath: mountpoint-registrar.properties
367           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
368             name: properties
369             subPath: mountpoint-state-provider.properties
370           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
371             name: properties
372             subPath: org.opendaylight.daexim.cfg
373           {{- if .Values.config.sdnr.oauth.enabled }}
374           - mountPath: {{ .Values.config.odl.etcDir }}/oauth-provider.config.json
375             name: properties
376             subPath: oauth-provider.config.json
377           {{ end }}
378           resources:
379 {{ include "common.resources" . | indent 12 }}
380         {{- if .Values.nodeSelector }}
381         nodeSelector:
382 {{ toYaml .Values.nodeSelector | indent 10 }}
383         {{- end -}}
384         {{- if .Values.affinity }}
385         affinity:
386 {{ toYaml .Values.affinity | indent 10 }}
387         {{- end }}
388
389         # side car containers
390         - name: filebeat-onap
391           image: {{ include "repositoryGenerator.image.logging" . }}
392           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
393           volumeMounts:
394           - mountPath: /usr/share/filebeat/filebeat.yml
395             name: filebeat-conf
396             subPath: filebeat.yml
397           - mountPath: /var/log/onap
398             name: logs
399           - mountPath: /usr/share/filebeat/data
400             name: data-filebeat
401       imagePullSecrets:
402       - name: "{{ include "common.namespace" . }}-docker-registry-key"
403       volumes:
404         - name: localtime
405           hostPath:
406             path: /etc/localtime
407         - name: logs
408           emptyDir: {}
409         - name: data-filebeat
410           emptyDir: {}
411         - name: filebeat-conf
412           configMap:
413             name: {{ include "common.fullname" . }}-filebeat-configmap
414         - name: sdnc-logging-cfg-config
415           configMap:
416             name: {{ include "common.fullname" . }}-log-configmap
417         - name: bin
418           configMap:
419             name: {{ include "common.fullname" . }}-bin
420             defaultMode: 0755
421         - name: config-input
422           configMap:
423             name: {{ include "common.fullname" . }}-properties
424             defaultMode: 0644
425         - name: properties
426           emptyDir:
427             medium: Memory
428   {{ if not .Values.persistence.enabled }}
429         - name: {{ include "common.fullname" . }}-data
430           emptyDir: {}
431   {{ else }}
432 {{ include "common.certInitializer.volumes" . | nindent 8 }}
433 {{ include "common.certServiceClient.volumes" . | nindent 8 }}
434 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
435 {{ include "common.certManager.volumes" . | nindent 8 }}
436 {{- end }}
437   volumeClaimTemplates:
438   - metadata:
439       name: {{ include "common.fullname" . }}-data
440       labels:
441         name: {{ include "common.fullname" . }}
442         chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
443         release: "{{ include "common.release" . }}"
444         heritage: "{{ .Release.Service }}"
445     spec:
446       accessModes:
447       - {{ .Values.persistence.accessMode }}
448       storageClassName: {{ include "common.storageClass" . }}
449       resources:
450         requests:
451           storage: {{ .Values.persistence.size }}
452   {{- end }}