2023-11-11 08:53:16 +00:00
|
|
|
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim ) -}}
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: {{ include "fhem.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "fhem.labels" . | nindent 4 }}
|
|
|
|
spec:
|
2024-09-18 15:04:02 +00:00
|
|
|
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
2023-11-11 08:53:16 +00:00
|
|
|
accessModes:
|
|
|
|
{{- if not (empty .Values.persistence.accessModes) }}
|
|
|
|
{{- range .Values.persistence.accessModes }}
|
|
|
|
- {{ . | quote }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
- {{ .Values.persistence.accessMode | quote }}
|
|
|
|
{{- end }}
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: {{ .Values.persistence.size | quote }}
|
|
|
|
{{- end -}}
|