homeassistant-charts/templates/persistentVolumeClaim.yaml

24 lines
728 B
YAML
Raw Permalink Normal View History

2023-11-09 16:42:34 +00:00
{{- 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 }}