Ingresses: switch to Traefik (lan-only middleware; tv: GeoIP + rate limit middlewares)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-02 12:16:10 +01:00
co-authored by Claude Opus 5.5
parent c4bd8ebd12
commit bd6467d054
3 changed files with 64 additions and 37 deletions
+12 -19
View File
@@ -40,20 +40,17 @@ media:
- media/manga
ingress:
className: nginx
className: traefik
# Each app with `ingress: true` gets <name>.<domain>. The DNS records point at the
# node's private IP, so the UIs are only reachable from the LAN / via VPN.
domain: smokyzone.de
# DNS-01 works for hostnames that only resolve to a private IP.
clusterIssuer: letsencrypt-dns-cloudflare
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 100m
# LAN-only: home network + pods (incl. the Tailscale subnet router, 10.1.0.0/16), but
# NOT 192.168.2.218 - the router's internet forward (443 -> NodePort 30444, for git)
# arrives SNATed as the node's own IP. So internet clients that send this hostname
# get 403, while LAN clients reach the ingress directly on hostPort 443 with their
# real IP. Side effect: LAN access via :30444 is blocked too (use the URL without port).
nginx.ingress.kubernetes.io/whitelist-source-range: "192.168.2.0/25,192.168.2.128/26,192.168.2.192/28,192.168.2.208/29,192.168.2.216/31,192.168.2.219/32,192.168.2.220/30,192.168.2.224/27,10.1.0.0/16"
# LAN-only: home network + pods (incl. Tailscale), Middleware traefik/lan-only in apps-in-apps.
# Side effect: LAN access via the NodePort (:30444) is blocked (arrives SNATed as the
# node's IP) - use the URL without port.
traefik.ingress.kubernetes.io/router.middlewares: traefik-lan-only@kubernetescrd
# StorageClass for the per-app config PVCs, empty = cluster default.
storageClassName: ""
@@ -90,8 +87,8 @@ apps:
# plugin (apps-in-apps: intel-gpu-plugin), which injects /dev/dri. Not privileged.
gpu: true
# Remote access without VPN (templates/public-ingress.yaml): DE-only via GeoIP in
# ingress-nginx, rate limited. jellyfin.smokyzone.de stays LAN/Tailscale-only.
# templates/networkpolicy.yaml: only ingress-nginx, Seerr and the node may connect;
# Traefik, rate limited. jellyfin.smokyzone.de stays LAN/Tailscale-only.
# templates/networkpolicy.yaml: only the ingress controller, Seerr and the node may connect;
# Jellyfin itself may only reach DNS and the public internet.
networkPolicy:
allowFrom:
@@ -103,20 +100,16 @@ apps:
publicIngress:
host: tv.smokyzone.de
# The web UI loads 40+ scripts/images in parallel at startup (plugins: SeerrFin,
# Featured, Bonfire ...). With HTTP/2 every stream counts against limit-connections;
# 30 caused 429s for plugin scripts. Login stays limited separately (10/min).
limitRps: "50"
limitConnections: "100"
# Jellyfin's routing is case-insensitive, nginx paths are not -> both spellings.
# Featured, Bonfire ...). Every HTTP/2 stream counts as an in-flight request; 30
# caused 429s for plugin scripts. Login stays limited separately (10/min).
limitRps: 50
limitConnections: 100
# Jellyfin's routing is case-insensitive, ingress paths are not -> both spellings.
loginPaths:
- /Users/AuthenticateByName
- /users/authenticatebyname
- /Users/ForgotPassword
- /users/forgotpassword
ingressAnnotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
env:
- name: JELLYFIN_PublishedServerUrl
value: https://jellyfin.smokyzone.de