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