{{- if .Values.grafana.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: drycc-monitor-grafana
  labels:
    heritage: drycc
spec:
  accessModes:
    - {{ .Values.grafana.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.grafana.persistence.size | quote }}
{{- if .Values.grafana.persistence.storageClass }}
{{- if (eq "-" .Values.grafana.persistence.storageClass) }}
  storageClassName: ""
{{- else }}
  storageClassName: "{{ .Values.grafana.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- if .Values.grafana.persistence.volumeName }}
  volumeName: "{{ .Values.grafana.persistence.volumeName }}"
{{- end }}
{{- end }}
