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