Ingress: switch to Traefik (cf-only middleware), trust Cloudflare ranges as proxies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+29
-6
@@ -18,14 +18,38 @@ persistence:
|
||||
size: 5Gi
|
||||
storageClassName: ""
|
||||
|
||||
# Lets HA accept requests from ingress-nginx (pod network 10.1.0.0/16); without it HA
|
||||
# Lets HA accept requests from Traefik (pod network 10.1.0.0/16); without it HA
|
||||
# answers 400 Bad Request to proxied requests. Since 2026.10 HA keeps the HTTP settings
|
||||
# in /config/.storage/http (UI-managed); an `http:` block in configuration.yaml is only
|
||||
# imported as an unconfirmed trial and reverted after 5 minutes. So the chart seeds the
|
||||
# store directly - on first start only, never overwriting an existing one.
|
||||
# Cloudflare ranges too: Traefik keeps Cloudflare's X-Forwarded-For (client IP) and appends
|
||||
# the Cloudflare edge, so HA has to skip that hop to find the real client (for ip_ban).
|
||||
trustedProxies:
|
||||
- 10.1.0.0/16
|
||||
- 127.0.0.1/32
|
||||
- 173.245.48.0/20
|
||||
- 103.21.244.0/22
|
||||
- 103.22.200.0/22
|
||||
- 103.31.4.0/22
|
||||
- 141.101.64.0/18
|
||||
- 108.162.192.0/18
|
||||
- 190.93.240.0/20
|
||||
- 188.114.96.0/20
|
||||
- 197.234.240.0/22
|
||||
- 198.41.128.0/17
|
||||
- 162.158.0.0/15
|
||||
- 104.16.0.0/13
|
||||
- 104.24.0.0/14
|
||||
- 172.64.0.0/13
|
||||
- 131.0.72.0/22
|
||||
- 2400:cb00::/32
|
||||
- 2606:4700::/32
|
||||
- 2803:f800::/32
|
||||
- 2405:b500::/32
|
||||
- 2405:8100::/32
|
||||
- 2a06:98c0::/29
|
||||
- 2c0f:f248::/32
|
||||
|
||||
# Written to /config/configuration.yaml on first start only (when the file does not
|
||||
# exist yet). Afterwards the file belongs to you; the chart never overwrites it.
|
||||
@@ -42,7 +66,7 @@ seedConfiguration: |
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
className: traefik
|
||||
# Public like git (user decision 2026-10-18): the DNS record is a Cloudflare-proxied
|
||||
# CNAME to git.smokyzone.de (kept current by the ddns CronJob), the router forwards 443
|
||||
# to the ingress. So the companion app works without Tailscale. No source allow-list on
|
||||
@@ -50,10 +74,9 @@ ingress:
|
||||
host: homeassistant.smokyzone.de
|
||||
clusterIssuer: letsencrypt-dns-cloudflare
|
||||
annotations:
|
||||
# Websocket connection of the frontend / companion app stays open.
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: 100m
|
||||
# Only reachable through Cloudflare (not directly via the home IP that tv.* reveals).
|
||||
# Traefik has no proxy timeouts/body limit by default (websockets stay open).
|
||||
traefik.ingress.kubernetes.io/router.middlewares: traefik-cf-only@kubernetescrd
|
||||
|
||||
# USB radios (Zigbee/Z-Wave sticks), e.g. /dev/serial/by-id/usb-...; needs privileged.
|
||||
devices: []
|
||||
|
||||
Reference in New Issue
Block a user