Seed HA's HTTP config store instead of the http YAML block

Since 2026.10 HA imports an http: block only as an unconfirmed trial and
reverts it after 5 minutes, which breaks access through the ingress (400).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-18 14:17:24 +02:00
co-authored by Claude Opus 5.5
parent 9f8ce47986
commit a9b62a514b
4 changed files with 39 additions and 23 deletions
+12
View File
@@ -7,3 +7,15 @@ metadata:
data:
configuration.yaml: |
{{- .Values.seedConfiguration | nindent 4 }}
# Format of HA's HTTP config store (homeassistant/components/http/config.py).
http.json: |
{{- dict "version" 2 "minor_version" 2 "key" "http" "data" (dict
"stable" (dict "server_port" (int .Values.port) "use_x_forwarded_for" true
"trusted_proxies" .Values.trustedProxies
"cors_allowed_origins" (list "https://cast.home-assistant.io")
"login_attempts_threshold" -1 "ip_ban_enabled" true
"ssl_profile" "modern" "use_x_frame_options" true
"created_at" "2026-10-18T00:00:00+00:00"
"error" nil "error_message" nil)
"pending" nil
"yaml_migration_done" true) | toPrettyJson | nindent 4 }}
+6 -1
View File
@@ -21,7 +21,7 @@ spec:
# Keep cluster DNS (service names) working with hostNetwork.
dnsPolicy: {{ ternary "ClusterFirstWithHostNet" "ClusterFirst" .Values.hostNetwork }}
initContainers:
# Seed configuration.yaml (incl. reverse-proxy settings) on first start only.
# Seed configuration.yaml and the HTTP (reverse proxy) store on first start only.
- name: seed-config
image: busybox:1.36
command:
@@ -33,6 +33,11 @@ spec:
cp /seed/configuration.yaml /config/configuration.yaml
echo "seeded configuration.yaml"
fi
if [ ! -f /config/.storage/http ]; then
mkdir -p /config/.storage
cp /seed/http.json /config/.storage/http
echo "seeded .storage/http (reverse proxy)"
fi
# Files included by the seeded configuration.yaml (same defaults as HA's onboarding).
[ -f /config/automations.yaml ] || echo "[]" > /config/automations.yaml
touch /config/scripts.yaml /config/scenes.yaml