Add PVC for sqlite database for homeassistant.
All checks were successful
ci/woodpecker/push/homeassistant Pipeline was successful
All checks were successful
ci/woodpecker/push/homeassistant Pipeline was successful
This commit is contained in:
parent
a445394557
commit
665301022f
3 changed files with 34 additions and 0 deletions
|
@ -68,6 +68,8 @@ spec:
|
|||
mountPath: /config
|
||||
- name: storage
|
||||
mountPath: /media/storage
|
||||
- name: database
|
||||
mountPath: /media/database
|
||||
- name: certificate-secret
|
||||
mountPath: /media/certificates
|
||||
- name: main-configmap
|
||||
|
@ -117,6 +119,13 @@ spec:
|
|||
{{- else }}
|
||||
claimName: {{ .Values.pvc.storage.existingClaim }}
|
||||
{{- end }}
|
||||
- name: database
|
||||
persistentVolumeClaim:
|
||||
{{- if not .Values.pvc.database.existingClaim }}
|
||||
claimName: {{ include "homeassistant.fullname" . }}-database
|
||||
{{- else }}
|
||||
claimName: {{ .Values.pvc.database.existingClaim }}
|
||||
{{- end }}
|
||||
- name: init
|
||||
configMap:
|
||||
name: {{ include "homeassistant.fullname" . }}-initscript
|
||||
|
|
|
@ -33,3 +33,21 @@ spec:
|
|||
requests:
|
||||
storage: {{ .Values.pvc.storage.storage | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- if not .Values.pvc.database.existingClaim -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "homeassistant.fullname" . }}-database
|
||||
labels:
|
||||
{{- include "homeassistant.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
helm.sh/resource-policy: "keep"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: {{ .Values.pvc.database.storageClassName | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.pvc.database.storage | quote }}
|
||||
{{- end }}
|
||||
|
|
|
@ -56,6 +56,11 @@ pvc:
|
|||
existingClaim: false
|
||||
storageClassName: ""
|
||||
storage: "5Gi"
|
||||
database:
|
||||
existingClaim: false
|
||||
storageClassName: ""
|
||||
storage: "5Gi"
|
||||
|
||||
|
||||
mainConfig:
|
||||
http:
|
||||
|
@ -63,6 +68,8 @@ mainConfig:
|
|||
ssl_certificate: /media/certificates/tls.crt
|
||||
ssl_key: /media/certificates/tls.key
|
||||
use_x_forwarded_for: true
|
||||
recorder:
|
||||
db_url: sqlite:////media/database/hass-db.sqlite
|
||||
config:
|
||||
packages: ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue