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