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