Allow a proper pvc for the store.
All checks were successful
ci/woodpecker/push/esphome Pipeline was successful

This commit is contained in:
Alex Manning 2023-06-07 21:25:30 +01:00
parent 2457d0e81f
commit 743a9991dd
3 changed files with 34 additions and 11 deletions

View file

@ -52,7 +52,7 @@ spec:
volumeMounts:
- name: config
mountPath: /config
- name: temp-store
- name: store
mountPath: /media/store
{{- with .Values.nodeSelector }}
nodeSelector:
@ -69,10 +69,15 @@ spec:
volumes:
- name: config
persistentVolumeClaim:
{{- if not .Values.pvc.existingClaim }}
{{- if not .Values.pvc.config.existingClaim }}
claimName: {{ include "esphome.fullname" . }}-config
{{- else }}
claimName: {{ .Values.pvc.existingClaim }}
claimName: {{ .Values.pvc.config.existingClaim }}
{{- end }}
- name: store
persistentVolumeClaim:
{{- if not .Values.pvc.store.existingClaim }}
claimName: {{ include "esphome.fullname" . }}-store
{{- else }}
claimName: {{ .Values.pvc.config.existingClaim }}
{{- end }}
- name: temp-store
emptyDir: {}

View file

@ -1,4 +1,4 @@
{{- if not .Values.pvc.existingClaim -}}
{{- if not .Values.pvc.config.existingClaim -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@ -10,8 +10,22 @@ metadata:
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.pvc.storageClassName | quote }}
storageClassName: {{ .Values.pvc.config.storageClassName | quote }}
resources:
requests:
storage: {{ .Values.pvc.storage | quote }}
storage: {{ .Values.pvc.config.storage | quote }}
{{- end }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "esphome.fullname" . }}-store
labels:
{{- include "esphome.labels" . | nindent 4 }}
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.pvc.store.storageClassName | quote }}
resources:
requests:
storage: {{ .Values.pvc.store.storage | quote }}

View file

@ -48,6 +48,10 @@ tolerations: []
affinity: {}
pvc:
existingClaim: false
storageClassName: ""
storage: 5Gi
config:
existingClaim: false
storageClassName: ""
storage: 1Gi
store:
storageClassName: ""
storage: 5Gi