[Multicloud] Use global storage templates for PVC
[oom.git] / kubernetes / multicloud / charts / multicloud-prometheus / charts / prometheus-grafana / templates / pv.yaml
index aa3a956..6cc1b93 100644 (file)
@@ -15,8 +15,8 @@
 */}}
 
 {{- if .Values.global.grafana.enabled -}}
-
 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if eq "True" (include "common.needPV" .) -}}
 kind: PersistentVolume
 apiVersion: v1
 metadata:
@@ -33,9 +33,10 @@ spec:
     storage: {{ .Values.persistence.size}}
   accessModes:
     - {{ .Values.persistence.accessMode }}
+  storageClassName: "{{ include "common.fullname" . }}-data"
   persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
   hostPath:
     path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
 {{- end -}}
-
-{{- end -}}
\ No newline at end of file
+{{- end -}}
+{{- end -}}