apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: sonarr-anime
  labels:
    app.kubernetes.io/instance: sonarr-anime
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: sonarr-anime
    helm.sh/chart: sonarr-anime-5.0.1
  namespace: sonarr-anime
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: traefik-gateway
      namespace: "traefik"
  hostnames:
    - "sonarr-anime.alexlebens.net"
  rules:
    - backendRefs:
        - group: ""
          kind: Service
          name: ak-outpost-traefik-proxy-auth
          namespace: authentik
          port: 9000
          weight: 100
      matches:
        - path:
            type: PathPrefix
            value: /outpost.goauthentik.io
    - backendRefs:
        - group: ""
          kind: Service
          name: sonarr-anime
          namespace: sonarr-anime
          port: 80
          weight: 1
      matches:
        - path:
            type: PathPrefix
            value: /
      filters:
        - extensionRef:
            group: traefik.io
            kind: Middleware
            name: oidc-forward-auth
          type: ExtensionRef
