---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: kanidm-http-redirect
  namespace: kanidm
  labels:
    app.kubernetes.io/name: kanidm
    app.kubernetes.io/instance: kanidm
spec:
  hostnames:
    - kanidm.k8s.syd1.au.unkin.net
    - auth.unkin.net
    - au.auth.unkin.net
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: kanidm
      sectionName: http
  rules:
    - filters:
        - type: RequestRedirect
          requestRedirect:
            scheme: https
            statusCode: 301
      matches:
        - path:
            type: PathPrefix
            value: /
