homeassistant-charts/templates/persistentVolumeClaim.yaml
Markus Pesch e8cd20b9f5
All checks were successful
continuous-integration/drone/push Build is passing
fix: add persistent volume claim
2023-11-09 17:42:39 +01:00

24 lines
728 B
YAML

{{- if .Values.persistentStorage.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
{{- with .Values.persistentStorage.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ include "homeassistant.fullname" . }}
labels:
{{- include "homeassistant.labels" . | nindent 4 }}
{{- with .Values.persistentStorage.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
{{- if .Values.persistentStorage.storageClass }}
storageClassName: {{ .Values.persistentStorage.storageClass }}
{{- end }}
resources:
requests:
storage: {{ required "Require size of persistent volume claim" .Values.persistentStorage.size }}
{{- end }}