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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user