helm-charts/grampsweb/templates/pvc.yaml

30 lines
725 B
YAML
Raw Permalink Normal View History

2023-11-20 23:41:51 +01:00
{{- if and
.Values.persistence.enabled
(not .Values.persistence.hostPath)
(not .Values.persistence.existingClaim)
}}
2023-11-20 23:06:37 +01:00
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "grampsweb.fullname" . }}
labels:
{{- include "grampsweb.labels" . | nindent 4 }}
{{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- with .Values.persistence.storageClass }}
{{- if (eq "-" .) }}
storageClassName: ""
{{- else }}
storageClassName: {{ . | quote }}
{{- end }}
{{- end }}
{{- end -}}