Switch to Traefik: final ports + hostPorts, default IngressClass, Gitea ingress; disable ingress-nginx

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-02 12:16:08 +01:00
co-authored by Claude Opus 5.5
parent f0513d13a7
commit 200c88e123
+19 -17
View File
@@ -142,9 +142,8 @@ applications:
syncOptions: syncOptions:
- CreateNamespace=true - CreateNamespace=true
# ingress-nginx - the only ingress controller. Was created by hand with kubectl; now # ingress-nginx - REPLACED by Traefik (2026-11-02), disabled. Upstream ingress-nginx is
# managed here. NOTE: upstream ingress-nginx is retired (no releases since 03/2026) - # retired (no releases since 03/2026). Kept here for a quick rollback for now.
# plan a migration (Gateway API / Traefik) eventually.
# #
# GeoIP: country database from DB-IP Lite (https://db-ip.com, CC BY 4.0), MaxMind-compatible, # GeoIP: country database from DB-IP Lite (https://db-ip.com, CC BY 4.0), MaxMind-compatible,
# stored on the node in /var/lib/ingress-geoip so the controller always has a DB even if # stored on the node in /var/lib/ingress-geoip so the controller always has a DB even if
@@ -153,7 +152,7 @@ applications:
# possible, the sidecar weekly; nginx reloads it daily (geoip2-autoreload-in-minutes). # possible, the sidecar weekly; nginx reloads it daily (geoip2-autoreload-in-minutes).
# Hosts listed in the $geo_restricted_host map only answer to clients from Germany. # Hosts listed in the $geo_restricted_host map only answer to clients from Germany.
- name: ingress-nginx - name: ingress-nginx
enabled: true enabled: false
source: source:
repoURL: https://kubernetes.github.io/ingress-nginx repoURL: https://kubernetes.github.io/ingress-nginx
chart: ingress-nginx chart: ingress-nginx
@@ -309,7 +308,9 @@ applications:
syncOptions: syncOptions:
- CreateNamespace=true - CreateNamespace=true
# Traefik - successor of ingress-nginx (IngressClass "traefik"). # Traefik - the ingress controller (IngressClass "traefik", default), successor of
# ingress-nginx. Listens on the node's ports 80/443 (hostPort, LAN/Tailscale) and on
# NodePorts 30081/30444 (target of the router's internet port forward).
# Replacements for the nginx snippets, all as Middlewares in this namespace (extraObjects), # Replacements for the nginx snippets, all as Middlewares in this namespace (extraObjects),
# referenced from Ingresses via traefik.ingress.kubernetes.io/router.middlewares: # referenced from Ingresses via traefik.ingress.kubernetes.io/router.middlewares:
# traefik-lan-only LAN + pod network only (the internal *.smokyzone.de UIs) # traefik-lan-only LAN + pod network only (the internal *.smokyzone.de UIs)
@@ -332,7 +333,7 @@ applications:
values: | values: |
ingressClass: ingressClass:
enabled: true enabled: true
isDefaultClass: false isDefaultClass: true
name: traefik name: traefik
providers: providers:
kubernetesIngress: kubernetesIngress:
@@ -343,8 +344,11 @@ applications:
type: NodePort type: NodePort
ports: ports:
web: web:
nodePort: 30082 nodePort: 30081
hostPort: 80
http: http:
# Drop X_Forwarded_For-style alias headers (nginx default too).
aliasHeadersStrategy: delete
redirections: redirections:
entryPoint: entryPoint:
to: websecure to: websecure
@@ -353,7 +357,10 @@ applications:
forwardedHeaders: forwardedHeaders:
trustedIPs: &cloudflare ["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"] trustedIPs: &cloudflare ["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"]
websecure: websecure:
nodePort: 30445 nodePort: 30444
hostPort: 443
http:
aliasHeadersStrategy: delete
forwardedHeaders: forwardedHeaders:
trustedIPs: *cloudflare trustedIPs: *cloudflare
transport: transport:
@@ -531,8 +538,7 @@ applications:
automated: automated:
prune: true prune: true
selfHeal: true selfHeal: true
# During the switch from ingress-nginx the NodePorts/hostPorts only become free once # NodePorts/hostPorts may still be held by a previous controller (rollback/migration).
# the old controller is gone.
retry: retry:
limit: 10 limit: 10
backoff: backoff:
@@ -615,15 +621,11 @@ applications:
ingress: ingress:
enabled: true enabled: true
className: nginx className: traefik
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-dns-cloudflare cert-manager.io/cluster-issuer: letsencrypt-dns-cloudflare
nginx.ingress.kubernetes.io/limit-rps: "10" # Cloudflare only, 10 req/s per client (burst 50), HSTS - see the traefik app.
nginx.ingress.kubernetes.io/limit-burst-multiplier: "5" traefik.ingress.kubernetes.io/router.middlewares: traefik-cf-only@kubernetescrd,traefik-gitea-ratelimit@kubernetescrd,traefik-gitea-hsts@kubernetescrd
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
nginx.ingress.kubernetes.io/hsts: "true"
nginx.ingress.kubernetes.io/hsts-max-age: "31536000"
nginx.ingress.kubernetes.io/hsts-include-subdomains: "false"
hosts: hosts:
- host: git.smokyzone.de - host: git.smokyzone.de
paths: paths: