# HTTP→HTTPS redirect for the dezky-apps ingresses (portal, booking).
#
# Replaces the former global Traefik entrypoint redirect, which broke ACME
# HTTP-01 (see traefik/helmchartconfig.yaml). This Middleware is attached only
# to the app routers via the
# `traefik.ingress.kubernetes.io/router.middlewares` annotation, so the
# cert-manager solver's own router (no middleware, more specific path) can still
# answer the challenge on :80.
#
# Referenced from an Ingress as: dezky-apps-redirect-https@kubernetescrd
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: redirect-https
  namespace: dezky-apps
spec:
  redirectScheme:
    scheme: https
    permanent: true
