{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "adguard-home.fullname" . }}-config {{- if .Values.persistence.config.skipuninstall }} annotations: "helm.sh/resource-policy": keep {{- end }} labels: app.kubernetes.io/name: {{ include "adguard-home.name" . }} helm.sh/chart: {{ include "adguard-home.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .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 -}}