{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ template "phabricator.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "phabricator.name" . }}
    helm.sh/chart: {{ include "phabricator.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
  {{ include "phabricator.storageClass" . }}
{{- end -}}
