include https-redirect middleware on generated Ingresses

Adds https-redirect@file to the router.middlewares annotation so static
sites force HTTP → HTTPS automatically. The middleware is defined in
fritzlab/apps/sjc001/infra/traefik/manifests/dynamic-config.yaml and
uses redirectScheme (permanent 308). Safe with cert-manager HTTP-01:
the solver pod's Ingress is generated separately and doesn't pick up
this annotation, so /.well-known/acme-challenge/* on port 80 continues
to reach the solver directly.
This commit is contained in:
Donavan Fritz
2026-05-27 16:30:31 -05:00
parent aa8c1a476f
commit 49eac4f945
+1 -1
View File
@@ -5,7 +5,7 @@ metadata:
namespace: {{ namespace }} namespace: {{ namespace }}
{%- if site_type != "docker" %} {%- if site_type != "docker" %}
annotations: annotations:
traefik.ingress.kubernetes.io/router.middlewares: retry-upstream@file traefik.ingress.kubernetes.io/router.middlewares: https-redirect@file,retry-upstream@file
{%- endif %} {%- endif %}
spec: spec:
ingressClassName: traefik ingressClassName: traefik