{{- if (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  labels: {{ include "hf.labels.commons" . | nindent 4 }}
  name: {{ include "name" . }}
  namespace: {{ .Release.Namespace }}
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: {{ .Values.persistence.size }}
  {{ if ne "" .Values.persistence.storageClass }}
  storageClassName: {{ .Values.persistence.storageClass }}
  {{ end }}
{{- end }}
