{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ include "baphomet-js.fullname" . }} labels: app: {{ include "baphomet-js.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: {{- if .Values.persistence.storageClass }} volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} {{- else }} volume.alpha.kubernetes.io/storage-class: default {{- end }} spec: accessModes: - {{ .Values.persistence.accessMode | quote }} resources: requests: storage: {{ .Values.persistence.size | quote }} {{- end }}