{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "deluge.fullname" . }}-config labels: app: {{ template "deluge.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: accessModes: - {{ .Values.persistence.config.accessMode | quote }} resources: requests: storage: {{ .Values.persistence.config.size | quote }} {{- if .Values.persistence.config.storageClass }} {{- if (eq "-" .Values.persistence.config.storageClass) }} storageClassName: "" {{- else }} storageClassName: "{{ .Values.persistence.config.storageClass }}" {{- end }} {{- end }} {{- end -}}