From b4cf4c0961a36bef3a14c5a0f14f98461dc2fa70 Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Sat, 18 Jul 2026 09:42:15 +0200 Subject: [PATCH] chore(k8s): migrate Zigbee2MQTT to helm in zigbee namespace --- k8s/README.md | 15 ++ k8s/monitoring/zigbee2mqtt.secret.yaml | Bin 683 -> 0 bytes k8s/monitoring/zigbee2mqtt.yaml | 206 ---------------------- k8s/zigbee/zigbee2mqtt.secret.values.yaml | 121 +++++++++++++ k8s/zigbee/zigbee2mqtt.secret.yaml | Bin 0 -> 675 bytes 5 files changed, 136 insertions(+), 206 deletions(-) delete mode 100644 k8s/monitoring/zigbee2mqtt.secret.yaml delete mode 100644 k8s/monitoring/zigbee2mqtt.yaml create mode 100644 k8s/zigbee/zigbee2mqtt.secret.values.yaml create mode 100644 k8s/zigbee/zigbee2mqtt.secret.yaml diff --git a/k8s/README.md b/k8s/README.md index 1bb3069..83d3222 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -826,3 +826,18 @@ An autonomous AI agent platform. * **Encrypt**: Ensure the file is encrypted with `git crypt` before committing! 3. **Deploy**: `kubectl apply -f openclaw/openclaw.secret.yaml` 4. **Access**: `https://openclaw.haumdaucher.de` (Authentication required) + +## Zigbee2MQTT + +Zigbee2MQTT manages Zigbee devices via the SLZB-MR1U coordinator. It is deployed via the official Helm chart in the `zigbee` namespace. + +```bash +helm repo add zigbee2mqtt https://charts.zigbee2mqtt.io +helm repo update +# Apply the secrets first for the Traefik basic auth middleware +kubectl apply -f zigbee/zigbee2mqtt.secret.yaml +# Install or upgrade the release +helm upgrade --install zigbee2mqtt zigbee2mqtt/zigbee2mqtt --create-namespace -n zigbee -f zigbee/zigbee2mqtt.secret.values.yaml +``` + +To modify configurations (like `devices`, `throttle`, or `mqtt`), edit `zigbee/zigbee2mqtt.secret.values.yaml` and re-run the `helm upgrade` command. The chart automatically handles merging these values into the persistent volume on startup. diff --git a/k8s/monitoring/zigbee2mqtt.secret.yaml b/k8s/monitoring/zigbee2mqtt.secret.yaml deleted file mode 100644 index 95453961667870befc92a4dbbeda054d0fe95045..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 683 zcmV;c0#y9~M@dveQdv+`06OZ6jG}W02s`Q+83Pl-kyh-!M~uw79vTG6W`W`hUq zW(dp368ZLA;jy6##)vq}{E>&S%q$O&&d70(Ak{kH-k$gb@Cpo~AY)}N%Sb?i?L!DB z_Ecgk1Tag2!fB^Op%&@^^a5d6vS7&_Lfw^K_UrxzHhw!lu%uabd9=#5fHG;N8?pQx zZ4r+6?0K=?ki@zc!?fG6D1APr6pAbn4r1A=*Pwwa{BV+VNQ>r6Wj~hgvc^&Ktg?Ke zgb&$+%5GP{{M8{eHajlRS6<1%5WqyUii;3SSH7hoOO&jO#W%MU#cclAhI=1XHm{jo zR?@}a%hIaz5Dh`&teW?o(zn?LiXN|;tpX(-bIWz=|JPXM?%ldNnKFq zX-lLDBw7BQo72mQdu^N572CKous8RB!u|e=-{643>XW|FOZ3B}lH651-(te**IpgG z5hHc!U;r@kZ-;1AQY|V{9Z3T9*yxVINE|et|k9k}Xg2%&}Z*&RWs+i@lwAA)bDnaOULa z((MQ;+N|PJOg(G_8Tpea8p7RUg` 0) - for: 1h - labels: - severity: warning - annotations: - summary: "Shelly WS90 Weather Station metrics are stale" - description: "No new metrics have been received from the Shelly WS90 weather station (sensor.shelly_ws90_temperatur) for over 1 hour. The device may be offline, out of range, or batteries might be depleted." - - diff --git a/k8s/zigbee/zigbee2mqtt.secret.values.yaml b/k8s/zigbee/zigbee2mqtt.secret.values.yaml new file mode 100644 index 0000000..5d2d728 --- /dev/null +++ b/k8s/zigbee/zigbee2mqtt.secret.values.yaml @@ -0,0 +1,121 @@ +configmap: + enabled: true + devices: + '0xfc4d6afffe246794': + friendly_name: Shelly WS90 + throttle: 30 + retain: true + qos: 1 + +statefulset: + storage: + enabled: true + size: 1Gi + storageClassName: openebs-hostpath + +ingress: + enabled: true + ingressClassName: traefik + annotations: + kubernetes.io/ingress.class: "traefik" + cert-manager.io/cluster-issuer: "letsencrypt-prod" + kubernetes.io/tls-acme: "true" + nginx.ingress.kubernetes.io/proxy-body-size: "0" + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + traefik.ingress.kubernetes.io/router.middlewares: zigbee-zigbee2mqtt-auth@kubernetescrd + hosts: + - host: zigbee2mqtt.moritzgraf.de + paths: + - path: / + pathType: Prefix + tls: + - secretName: zigbee2mqtt-moritzgraf-de + hosts: + - zigbee2mqtt.moritzgraf.de + +zigbee2mqtt: + homeassistant: + enabled: true + mqtt: + base_topic: zigbee2mqtt + server: mqtt://mosquitto.datalab.svc.cluster.local:1883 + user: sender + password: ahQueteiRietufeko8do + serial: + port: tcp://192.168.10.10:7638 + adapter: zstack + frontend: + enabled: true + port: 8080 + host: 0.0.0.0 + advanced: + network_key: + - 177 + - 180 + - 148 + - 63 + - 174 + - 86 + - 166 + - 83 + - 119 + - 36 + - 123 + - 147 + - 245 + - 85 + - 166 + - 74 + log_level: debug + log_directories_to_keep: 100 + adapter_concurrent: 8 + adapter_delay: 100 + transmit_power: 20 + device_options: {} + +extraResources: + - apiVersion: traefik.io/v1alpha1 + kind: Middleware + metadata: + name: zigbee2mqtt-auth + namespace: zigbee + spec: + basicAuth: + secret: zigbee2mqtt-auth-secret + removeHeader: true + - apiVersion: monitoring.coreos.com/v1 + kind: PrometheusRule + metadata: + name: zigbee2mqtt-alerts + namespace: zigbee + labels: + release: prometheus-operator + spec: + groups: + - name: zigbee2mqtt.rules + rules: + - alert: Zigbee2MQTTDown + expr: kube_pod_container_status_ready{container="zigbee2mqtt", namespace="zigbee"} == 0 + for: 1h + labels: + severity: critical + annotations: + summary: "Zigbee2MQTT is down" + description: "The Zigbee2MQTT pod is not ready. This typically indicates a connection failure to the SLZB-MR1U coordinator host at 192.168.10.10:7638, or a crash within the Z2M application." + - alert: Zigbee2MQTTBridgeOffline + expr: homeassistant_binary_sensor_state{entity="binary_sensor.zigbee2mqtt_bridge_connection_state"} == 0 + for: 1h + labels: + severity: critical + annotations: + summary: "Zigbee2MQTT Bridge Connection Offline" + description: "The Zigbee2MQTT bridge connection is reported as offline. The bridge has lost communication with the MQTT broker or the Zigbee coordinator." + - alert: ShellyWS90MetricsStale + expr: absent(homeassistant_sensor_temperature_celsius{entity="sensor.shelly_ws90_temperatur"}) or (time() - max(homeassistant_last_updated_time_seconds{entity=~"sensor.shelly_ws90_.*"}) > 3600) + for: 1h + labels: + severity: warning + annotations: + summary: "Shelly WS90 Weather Station metrics are stale" + description: "No new metrics have been received from the Shelly WS90 weather station (sensor.shelly_ws90_temperatur) for over 1 hour. The device may be offline, out of range, or batteries might be depleted." diff --git a/k8s/zigbee/zigbee2mqtt.secret.yaml b/k8s/zigbee/zigbee2mqtt.secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e31bef5f1c76acd32922930db063087072ad3dc0 GIT binary patch literal 675 zcmV;U0$lw7M@dveQdv+`06;zLR!NR+h;I;4*vH%{mpfw;&Y{M62i?=K(2UUTqiE;Y zsB)E(lB;E2o~b@S`^uutkpRD88);PF`-a@E71@K%#@}J^VAPbhMgILLb2L8VJ=JvF z>9*7w;2Od9;ZLbg(aKvC_}HX^JP&mW9dxc>e@;zwPS}q`x8)KKvf+}hcyH|j8b9Pc zSR}~|Tb9_DZ~_cfnNL9dHRIU90K?#wcGia_oxfakDtOc<$Cxl8f^7uvLRk_HNLumVhgy3k&L z7BZzdy!Awr)`F5zkAKzTn|Jzbei)@zbo87c^rW)&gMQ)ZPS~2nU;$TC9RKleH*`pr z6g1^DPrLfZ5Z9ga*+zr%l}`js;iR+L(GSx$E3 zf6f#Wg@VH;B33oOG^F#*UZ*}p@@hr#`^DhC->D;)r}@Ewq`Y^f%h3NE#}qCK(@jc* zouTR;q%JiZF{wGM5-e6+%W#{i+kI%*p{5<#-Y;oYGU{i7-HMSWQw6yRmXXWe-=sz- z0{{D0ozkn)WB^5-x$MPc+YEm$g+^i(;ulPoBN+8AKuyglOJEm)^drJ>gG=E@_}WAK z7EdlkW?8trB3}7ip(I9;z>2_?wC|>e03ur^^gf!3I=yBpG!!Qplgi+?Fo%mC%B6R+ zB