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
|
mountPath: /config
|
||||||
- name: storage
|
- name: storage
|
||||||
mountPath: /media/storage
|
mountPath: /media/storage
|
||||||
|
- name: database
|
||||||
|
mountPath: /media/database
|
||||||
- name: certificate-secret
|
- name: certificate-secret
|
||||||
mountPath: /media/certificates
|
mountPath: /media/certificates
|
||||||
- name: main-configmap
|
- name: main-configmap
|
||||||
|
@ -117,6 +119,13 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
claimName: {{ .Values.pvc.storage.existingClaim }}
|
claimName: {{ .Values.pvc.storage.existingClaim }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
- name: database
|
||||||
|
persistentVolumeClaim:
|
||||||
|
{{- if not .Values.pvc.database.existingClaim }}
|
||||||
|
claimName: {{ include "homeassistant.fullname" . }}-database
|
||||||
|
{{- else }}
|
||||||
|
claimName: {{ .Values.pvc.database.existingClaim }}
|
||||||
|
{{- end }}
|
||||||
- name: init
|
- name: init
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "homeassistant.fullname" . }}-initscript
|
name: {{ include "homeassistant.fullname" . }}-initscript
|
||||||
|
|
|
@ -33,3 +33,21 @@ spec:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.pvc.storage.storage | quote }}
|
storage: {{ .Values.pvc.storage.storage | quote }}
|
||||||
{{- end }}
|
{{- 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
|
existingClaim: false
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
storage: "5Gi"
|
storage: "5Gi"
|
||||||
|
database:
|
||||||
|
existingClaim: false
|
||||||
|
storageClassName: ""
|
||||||
|
storage: "5Gi"
|
||||||
|
|
||||||
|
|
||||||
mainConfig:
|
mainConfig:
|
||||||
http:
|
http:
|
||||||
|
@ -63,6 +68,8 @@ mainConfig:
|
||||||
ssl_certificate: /media/certificates/tls.crt
|
ssl_certificate: /media/certificates/tls.crt
|
||||||
ssl_key: /media/certificates/tls.key
|
ssl_key: /media/certificates/tls.key
|
||||||
use_x_forwarded_for: true
|
use_x_forwarded_for: true
|
||||||
|
recorder:
|
||||||
|
db_url: sqlite:////media/database/hass-db.sqlite
|
||||||
config:
|
config:
|
||||||
packages: ""
|
packages: ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue