{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ template "mediawiki.fullname" . }}-mediawiki
  labels:
    app: {{ template "mediawiki.name" . }}
    chart: {{ template "mediawiki.chart" . }}
    release: {{ .Release.Name | quote }}
    heritage: {{ .Release.Service | quote }}
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
  {{ include "mediawiki.storageClass" . }}
{{- end -}}
