diff --git a/homeassistant/Chart.yaml b/homeassistant/Chart.yaml index 5f106a1..c23af60 100644 --- a/homeassistant/Chart.yaml +++ b/homeassistant/Chart.yaml @@ -3,7 +3,7 @@ name: homeassistant description: A Helm chart to deploy Home Assistant on Kubernetes type: application -version: 1.3.1-release-2026-2-3 +version: 1.4.0+up2026.2.3 appVersion: "2026.2.3" diff --git a/homeassistant/templates/homeassistant.pvc.yaml b/homeassistant/templates/homeassistant.pvc.yaml new file mode 100644 index 0000000..3633f1d --- /dev/null +++ b/homeassistant/templates/homeassistant.pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Chart.Name }}-{{ .Release.Name }}-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.core.storage.size }} + storageClassName: {{ .Values.core.storage.storageClass }} diff --git a/homeassistant/templates/homeassistant.sfs.yaml b/homeassistant/templates/homeassistant.sfs.yaml index 2cec62c..1c23d4e 100644 --- a/homeassistant/templates/homeassistant.sfs.yaml +++ b/homeassistant/templates/homeassistant.sfs.yaml @@ -21,6 +21,9 @@ spec: - name: "{{ .Release.Name }}-{{ .Chart.Name }}" image: "ghcr.io/home-assistant/home-assistant:{{ .Chart.AppVersion }}" imagePullPolicy: IfNotPresent + env: + - name: TZ + value: "{{ .Values.core.timezone }}" ports: - name: http containerPort: 8123 @@ -30,10 +33,11 @@ spec: limits: cpu: {{ .Values.resources.limits.cpu }} memory: {{ .Values.resources.limits.memory }} + ephemeral-storage: {{ .Values.resources.limits.ephemeralStorage }} requests: cpu: {{ .Values.resources.requests.cpu }} memory: {{ .Values.resources.requests.memory }} - # TODO: volume mounts + ephemeral-storage: {{ .Values.resources.requests.ephemeralStorage }} volumeMounts: - mountPath: /config/configuration.yaml subPath: configuration.yaml @@ -44,7 +48,9 @@ spec: - mountPath: /config/recorder-config.yaml subPath: recorder-config.yaml name: recorder-config - # TODO: volumes + - mountPath: /config + name: hass-volume + subPath: hass-config volumes: - name: core-config secret: @@ -64,4 +70,7 @@ spec: items: - key: recorder-config path: recorder-config.yaml + - name: hass-volume + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-{{ .Release.Name }}-pvc # TODO: bind to local nodes \ No newline at end of file diff --git a/homeassistant/values.yaml b/homeassistant/values.yaml index 3055fcf..217fe79 100644 --- a/homeassistant/values.yaml +++ b/homeassistant/values.yaml @@ -26,9 +26,11 @@ resources: limits: cpu: 1 memory: 1Gi + ephemeralStorage: 1Gi requests: cpu: 0.2 memory: 512Mi + ephemeralStorage: 128Mi # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ livenessProbe: @@ -59,6 +61,12 @@ tolerations: [] affinity: {} +core: + timezone: "UTC" + storage: + size: 5Gi + storageClass: "default" + # Must include the following keys: # - config # - http-config