{{- if .Values.persistence.enabled }}
{{- if not .Values.persistence.existingClaim }}
---
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
  name: {{ include "common.names.fullname" . }}
  labels:
    {{- include "common.labels.standard" . | nindent 4 }}
  {{- with .Values.persistence.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  accessModes: {{ .Values.persistence.accessModes }}
  {{- if .Values.persistence.storageClassName }}
  storageClassName: {{ .Values.persistence.storageClassName }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
...
{{- end }}
{{- end }}
