diff --git a/apps/homeassistant/Makefile b/apps/homeassistant/Makefile index f1e32fbde..30b8f1928 100644 --- a/apps/homeassistant/Makefile +++ b/apps/homeassistant/Makefile @@ -1,2 +1,12 @@ include ../../Makefile.common +.PHONY: generate +generate: $(MANIFESTS_DIR) $(JSONNET_VENDOR) ## Generate yaml code from jsonnet + jsonnet -J jsonnet/vendor -c -m $(MANIFESTS_DIR) -S jsonnet/main.jsonnet + $(MAKE) beautify + $(MAKE) prepull + +.PHONY: prepull +prepull: ## Move jobPull.yaml to prepull directory + mkdir -p $(MANIFESTS_DIR)/../prepull + mv $(MANIFESTS_DIR)/homeassistant/jobPull.yaml $(MANIFESTS_DIR)/../prepull/jobPull.yaml diff --git a/apps/homeassistant/jsonnet/main.jsonnet b/apps/homeassistant/jsonnet/main.jsonnet index 83d1a749f..75c08bcec 100644 --- a/apps/homeassistant/jsonnet/main.jsonnet +++ b/apps/homeassistant/jsonnet/main.jsonnet @@ -90,6 +90,7 @@ local all = { }, homeassistant: homeassistant(config.homeassistant) + { + prePull+:: {}, credentials: externalsecret( { name: config.homeassistant.apiTokenSecretKeySelector.name, diff --git a/apps/homeassistant/manifests/homeassistant/backupsPVC.yaml b/apps/homeassistant/manifests/homeassistant/backupsPVC.yaml index f3bbe723d..7d418cb94 100644 --- a/apps/homeassistant/manifests/homeassistant/backupsPVC.yaml +++ b/apps/homeassistant/manifests/homeassistant/backupsPVC.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant-backups namespace: homeassistant spec: diff --git a/apps/homeassistant/manifests/homeassistant/configs.yaml b/apps/homeassistant/manifests/homeassistant/configs.yaml index d208bf18c..b7b98148f 100644 --- a/apps/homeassistant/manifests/homeassistant/configs.yaml +++ b/apps/homeassistant/manifests/homeassistant/configs.yaml @@ -575,6 +575,6 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant-configs namespace: homeassistant diff --git a/apps/homeassistant/manifests/homeassistant/ingress.yaml b/apps/homeassistant/manifests/homeassistant/ingress.yaml index 6d55df9c2..8f82e811a 100644 --- a/apps/homeassistant/manifests/homeassistant/ingress.yaml +++ b/apps/homeassistant/manifests/homeassistant/ingress.yaml @@ -14,7 +14,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 probe: enabled reloader.homer/enabled: "true" name: homeassistant diff --git a/apps/homeassistant/manifests/homeassistant/prometheusRule.yaml b/apps/homeassistant/manifests/homeassistant/prometheusRule.yaml index affd7029b..4e913d339 100644 --- a/apps/homeassistant/manifests/homeassistant/prometheusRule.yaml +++ b/apps/homeassistant/manifests/homeassistant/prometheusRule.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 prometheus: k8s role: alert-rules name: homeassistant diff --git a/apps/homeassistant/manifests/homeassistant/service.yaml b/apps/homeassistant/manifests/homeassistant/service.yaml index 494e0d125..3c097f9e8 100644 --- a/apps/homeassistant/manifests/homeassistant/service.yaml +++ b/apps/homeassistant/manifests/homeassistant/service.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant namespace: homeassistant spec: diff --git a/apps/homeassistant/manifests/homeassistant/serviceAccount.yaml b/apps/homeassistant/manifests/homeassistant/serviceAccount.yaml index bcace6aaf..eb94ea694 100644 --- a/apps/homeassistant/manifests/homeassistant/serviceAccount.yaml +++ b/apps/homeassistant/manifests/homeassistant/serviceAccount.yaml @@ -6,6 +6,6 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant namespace: homeassistant diff --git a/apps/homeassistant/manifests/homeassistant/serviceMonitor.yaml b/apps/homeassistant/manifests/homeassistant/serviceMonitor.yaml index 0a3e039d5..265f4ad86 100644 --- a/apps/homeassistant/manifests/homeassistant/serviceMonitor.yaml +++ b/apps/homeassistant/manifests/homeassistant/serviceMonitor.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant namespace: homeassistant spec: diff --git a/apps/homeassistant/manifests/homeassistant/statefulSet.yaml b/apps/homeassistant/manifests/homeassistant/statefulSet.yaml index 9e4a476e6..514aa7aa8 100644 --- a/apps/homeassistant/manifests/homeassistant/statefulSet.yaml +++ b/apps/homeassistant/manifests/homeassistant/statefulSet.yaml @@ -5,7 +5,7 @@ metadata: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 name: homeassistant namespace: homeassistant spec: @@ -24,13 +24,13 @@ spec: app.kubernetes.io/component: server app.kubernetes.io/name: homeassistant app.kubernetes.io/part-of: homeassistant - app.kubernetes.io/version: 2024.12.3 + app.kubernetes.io/version: 2025.1.1 spec: containers: - env: - name: TZ value: Europe/Berlin - image: homeassistant/home-assistant:2024.12.3 + image: homeassistant/home-assistant:2025.1.1 imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 5 @@ -90,7 +90,7 @@ spec: - sh - -c - echo 'OK' > /config/www/healthz - image: homeassistant/home-assistant:2024.12.3 + image: homeassistant/home-assistant:2025.1.1 imagePullPolicy: IfNotPresent name: healthcheck resources: diff --git a/apps/homeassistant/manifests/homeassistant/jobPull.yaml b/apps/homeassistant/prepull/jobPull.yaml similarity index 100% rename from apps/homeassistant/manifests/homeassistant/jobPull.yaml rename to apps/homeassistant/prepull/jobPull.yaml diff --git a/apps/homeassistant/settings.yaml b/apps/homeassistant/settings.yaml index 3d24ad6d3..886bafe42 100644 --- a/apps/homeassistant/settings.yaml +++ b/apps/homeassistant/settings.yaml @@ -3,8 +3,8 @@ common: namespace: &namespace "homeassistant" externalSecretStoreName: &externalSecretStoreName "doppler-auth-api" homeassistant: - version: "2024.12.3" # application-version-from-github: home-assistant/core - image: "homeassistant/home-assistant:2024.12.3" # application-image-from-github: home-assistant/core + version: "2025.1.1" # application-version-from-github: home-assistant/core + image: "homeassistant/home-assistant:2025.1.1" # application-image-from-github: home-assistant/core namespace: *namespace ingress: domain: "home.ankhmorpork.thaum.xyz" diff --git a/base/flux-apps/homeassistant-prepull.yaml b/base/flux-apps/homeassistant-prepull.yaml new file mode 100644 index 000000000..0d9dfff0a --- /dev/null +++ b/base/flux-apps/homeassistant-prepull.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: homeassistant-prepull + namespace: flux-apps +spec: + interval: 60m0s + path: ./apps/homeassistant/prepull + prune: true + sourceRef: + kind: GitRepository + name: ankhmorpork diff --git a/base/flux-apps/homeassistant.yaml b/base/flux-apps/homeassistant.yaml index c0e5cfdba..4c2cab335 100644 --- a/base/flux-apps/homeassistant.yaml +++ b/base/flux-apps/homeassistant.yaml @@ -10,4 +10,5 @@ spec: sourceRef: kind: GitRepository name: ankhmorpork - + dependsOn: + - name: homeassistant-prepull