Skip to content

Commit

Permalink
homeassistant: better pre-pull job
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Jan 7, 2025
1 parent c5be294 commit a508e03
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 14 deletions.
10 changes: 10 additions & 0 deletions apps/homeassistant/Makefile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions apps/homeassistant/jsonnet/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ local all = {
},

homeassistant: homeassistant(config.homeassistant) + {
prePull+:: {},
credentials: externalsecret(
{
name: config.homeassistant.apiTokenSecretKeySelector.name,
Expand Down
2 changes: 1 addition & 1 deletion apps/homeassistant/manifests/homeassistant/backupsPVC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion apps/homeassistant/manifests/homeassistant/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion apps/homeassistant/manifests/homeassistant/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/homeassistant/manifests/homeassistant/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions apps/homeassistant/manifests/homeassistant/statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/homeassistant/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions base/flux-apps/homeassistant-prepull.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion base/flux-apps/homeassistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ spec:
sourceRef:
kind: GitRepository
name: ankhmorpork

dependsOn:
- name: homeassistant-prepull

0 comments on commit a508e03

Please sign in to comment.