feat(traefik): add custom error pages with tarampampam/error-pages

Deploy error-pages service to show themed error pages instead of raw
Traefik 502/503/504 responses. Adds catch-all IngressRoute (priority 1)
for 404 on unknown hosts. Only 5xx intercepted to avoid breaking JSON APIs.
This commit is contained in:
Viktor Barzin 2026-03-19 23:14:27 +00:00
parent d95144bd05
commit 250a058627
3 changed files with 337 additions and 0 deletions

View file

@ -111,6 +111,7 @@ resource "kubernetes_ingress_v1" "proxied-ingress" {
annotations = merge({
"traefik.ingress.kubernetes.io/router.middlewares" = join(",", compact(concat([
"traefik-retry@kubernetescrd",
"traefik-error-pages@kubernetescrd",
var.skip_default_rate_limit ? null : "traefik-rate-limit@kubernetescrd",
var.custom_content_security_policy == null ? "traefik-csp-headers@kubernetescrd" : null,
var.exclude_crowdsec ? null : "traefik-crowdsec@kubernetescrd",