Migrate all service modules from nginx-ingress to Traefik

- Remove nginx-specific ingress variables (use_proxy_protocol, proxy_timeout, additional_configuration_snippet)
- Update ingress annotations to use Traefik middleware CRDs
- Delete nginx-ingress module (replaced by traefik)
- Add new traefik middleware.tf for shared middleware definitions
- Update service modules to work with new ingress_factory interface
This commit is contained in:
Viktor Barzin 2026-02-07 13:25:49 +00:00
parent 0315dd4044
commit c32acc70e6
No known key found for this signature in database
GPG key ID: 0EB088298288D958
53 changed files with 534 additions and 1714 deletions

View file

@ -140,7 +140,4 @@ module "ingress" {
name = "qbittorrent"
tls_secret_name = var.tls_secret_name
protected = true
extra_annotations = {
"nginx.ingress.kubernetes.io/proxy-body-size" : "1G" // allow uploading .torrent files
}
}

View file

@ -123,13 +123,13 @@ resource "kubernetes_ingress_v1" "readarr" {
name = "readarr"
namespace = "readarr"
annotations = {
"kubernetes.io/ingress.class" = "nginx"
"nginx.ingress.kubernetes.io/auth-url" : "https://oauth2.viktorbarzin.me/oauth2/auth"
"nginx.ingress.kubernetes.io/auth-signin" : "https://oauth2.viktorbarzin.me/oauth2/start?rd=/redirect/$http_host$escaped_request_uri"
"traefik.ingress.kubernetes.io/router.middlewares" = "traefik-rate-limit@kubernetescrd,traefik-csp-headers@kubernetescrd,traefik-crowdsec@kubernetescrd,traefik-authentik-forward-auth@kubernetescrd"
"traefik.ingress.kubernetes.io/router.entrypoints" = "websecure"
}
}
spec {
ingress_class_name = "traefik"
tls {
hosts = ["readarr.viktorbarzin.me"]
secret_name = var.tls_secret_name