diff --git a/kubernetes/main/apps/home-automation/home-assistant/app/helmrelease.yaml b/kubernetes/main/apps/home-automation/home-assistant/app/helmrelease.yaml index ae2af1a6..e6237177 100644 --- a/kubernetes/main/apps/home-automation/home-assistant/app/helmrelease.yaml +++ b/kubernetes/main/apps/home-automation/home-assistant/app/helmrelease.yaml @@ -35,31 +35,31 @@ spec: - name: volsync namespace: storage values: - defaultPodOptions: - affinity: - nodeAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - preference: - matchExpressions: - - key: nabucasa.feature.node.kubernetes.io/skyconnect - operator: Exists - annotations: - k8s.v1.cni.cncf.io/networks: | - [{ - "name":"multus-iot", - "namespace": "kube-system", - "ips": ["192.168.101.254/24"] - }] - secret.reloader.stakater.com/reload: "home-assistant-emqx-init,home-assistant-secret" - securityContext: - runAsUser: 0 - runAsGroup: 0 controllers: home-assistant: + pod: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: nabucasa.feature.node.kubernetes.io/skyconnect + operator: Exists + annotations: + k8s.v1.cni.cncf.io/networks: | + [{ + "name":"multus-iot", + "namespace": "kube-system", + "ips": ["192.168.101.254/24"] + }] + secret.reloader.stakater.com/reload: "home-assistant-emqx-init,home-assistant-secret" + securityContext: + runAsUser: 0 + runAsGroup: 0 containers: app: - image: + image: &home-assistant-image repository: ghcr.io/home-assistant/home-assistant tag: 2024.9.3 envFrom: @@ -86,7 +86,7 @@ spec: limits: memory: 2Gi code-server: - image: + image: &code-server-image repository: ghcr.io/coder/code-server tag: 4.92.2 args: [ @@ -121,21 +121,21 @@ spec: ) > /tmp/postStart.log 2>&1 || true initContainers: emqx-init: - image: + image: &emqx-init-image repository: ghcr.io/prehor/emqx-init tag: 1.0.0 envFrom: - secretRef: name: home-assistant-emqx-init - recorder-initdb: - image: + recorder-init: + image: &recorder-init-image repository: ghcr.io/onedr0p/postgres-init tag: 16 envFrom: - secretRef: name: home-assistant-postgres-recorder-initdb - config: - image: + config-init: + image: &config-init-image repository: docker.io/alpine/git tag: 2.45.2 command: ["/bin/sh","-c"] @@ -147,7 +147,7 @@ spec: rmdir /config/.hass-config/ fi usbip-attach: - image: + image: &usbip-attach-image repository: ghcr.io/prehor/usbip tag: 6.6.31 restartPolicy: Always # Sidecar container @@ -160,6 +160,42 @@ spec: - /entrypoint.sh --detach securityContext: privileged: true + preload-images: + type: job + annotations: + helm.sh/hook: pre-install,pre-upgrade + job: + ttlSecondsAfterFinished: 600 + pod: + restartPolicy: never + securityContext: + runAsUser: 568 + runAsGroup: 568 + containers: + home-assistant: + image: + <<: *home-assistant-image + command: ['/bin/true'] + code-server: + image: + <<: *code-server-image + command: ['/bin/true'] + emqx-init: + image: + <<: *emqx-init-image + command: ['/bin/true'] + recorder-init: + image: + <<: *recorder-init-image + command: ['/bin/true'] + config-init: + image: + <<: *config-init-image + command: ['/bin/true'] + usbip-attach: + image: + <<: *usbip-attach-image + command: ['/bin/true'] service: app: controller: home-assistant