{{- if and .Values.persistence.downloads.enabled (not .Values.persistence.downloads.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "nzbget.fullname" . }}-downloads labels: app.kubernetes.io/name: {{ include "nzbget.name" . }} helm.sh/chart: {{ include "nzbget.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: accessModes: - {{ .Values.persistence.downloads.accessMode | quote }} resources: requests: storage: {{ .Values.persistence.downloads.size | quote }} {{- if .Values.persistence.downloads.storageClass }} {{- if (eq "-" .Values.persistence.downloads.storageClass) }} storageClassName: "" {{- else }} storageClassName: "{{ .Values.persistence.downloads.storageClass }}" {{- end }} {{- end }} {{- end -}}