diff --git a/home-assistant-dev/Chart.yaml b/home-assistant-dev/Chart.yaml index 82007ba..1982c7c 100644 --- a/home-assistant-dev/Chart.yaml +++ b/home-assistant-dev/Chart.yaml @@ -4,7 +4,7 @@ description: Home Assistant development build - wraps home-assistant chart with type: application annotations: version-source: dockerhub-dev:homeassistant/home-assistant:^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$ -version: 0.1.21-dev +version: 0.1.22-dev appVersion: "2026.5.0.dev202603300315" dependencies: - name: home-assistant diff --git a/home-assistant/templates/deployment.yaml b/home-assistant/templates/deployment.yaml index 3584e60..84c55e3 100644 --- a/home-assistant/templates/deployment.yaml +++ b/home-assistant/templates/deployment.yaml @@ -34,24 +34,35 @@ spec: - | # Clean up old log files from PVC rm -f /config/home-assistant.log /config/home-assistant.log.1 + # Fix any corrupted \!include lines in configuration.yaml + if [ -f /config/configuration.yaml ]; then + sed -i 's/\\!/!/g' /config/configuration.yaml + fi volumeMounts: - name: config mountPath: /config {{- if .Values.http.enabled }} - name: init-http image: busybox:latest + env: + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP command: - /bin/sh - -c - | - # Build http.yaml — auto-detect pod/service CIDRs from environment - POD_CIDR=$(echo $KUBERNETES_SERVICE_HOST | sed 's/\.[0-9]*$/\.0\/16/') + # Auto-detect pod and service CIDRs + SVC_CIDR=$(echo $KUBERNETES_SERVICE_HOST | sed 's/\.[0-9]*$/\.0\/16/') + POD_CIDR=$(echo $POD_IP | sed 's/\.[0-9]*$/\.0\/16/') cat > /config/http.yaml << EOF server_port: {{ .Values.http.server_port }} ip_ban_enabled: {{ .Values.http.ip_ban_enabled }} login_attempts_threshold: {{ .Values.http.login_attempts_threshold }} use_x_forwarded_for: true trusted_proxies: + - ${SVC_CIDR} - ${POD_CIDR} - 127.0.0.1 - "::1"