{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.mode "standalone") }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ include "minio.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels: {{- include "minio.labels" . | nindent 4 }}
spec:
  accessModes:
  {{- range .Values.persistence.accessModes }}
    - {{ . | quote }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
  {{ include "minio.storageClass" . }}
{{- end }}
