From ea45224d0f0023cf31986f81d9c0c7ae4c1ebb0a Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Mon, 9 Sep 2024 20:30:32 +0200 Subject: [PATCH] Latest home assistant stuff --- k8s/README.md | 9 +++++++++ k8s/home-assistant/home-assistant.yaml | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/k8s/README.md b/k8s/README.md index d4464e2..d931f81 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -316,6 +316,15 @@ for i in "${NAMESPACES_TO_ALERT[@]}"; do done ``` +### influxdb + +Used to store hass data long term. + +```sh +helm repo add influxdata https://helm.influxdata.com/ +helm upgrade --install influxdb -n influxdb influxdata/influxdb2 -f influxdb/influxdb2.secret.yml --create-namespace +``` + ### home-assistant hass How to generate token (not really required): https://github.com/hahn-th/homematicip-rest-api diff --git a/k8s/home-assistant/home-assistant.yaml b/k8s/home-assistant/home-assistant.yaml index 6638276..d1cafe2 100644 --- a/k8s/home-assistant/home-assistant.yaml +++ b/k8s/home-assistant/home-assistant.yaml @@ -82,6 +82,15 @@ configuration: # moritz custom config prometheus: namespace: hass + influxdb: + host: influxdb-influxdb2.influxdb.svc.cluster.local + port: 80 + database: default + username: admin + password: enaiY9yaiWi6ahv0phoph3FaiphoGh + ssl: false + verify_ssl: false + max_retries: 3 # Init script for the Home Assistant initialization, you can use Go template functions # Script is executed before the Home Assistant container starts and is used to prepare the configuration @@ -133,6 +142,10 @@ configuration: touch /config/scenes.yaml fi + # install hacs - see https://www.hacs.xyz/docs/use/download/download/#to-download-hacs + apk add --no-cache bash + wget -O - https://get.hacs.xyz | bash - + initContainer: name: setup-config image: mikefarah/yq:4 @@ -157,7 +170,7 @@ configuration: serviceMonitor: # requires HA integration: https://www.home-assistant.io/integrations/prometheus/ - enabled: true + enabled: false scrapeInterval: 30s labels: prometheus: haumdaucher