apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: "harbor-route"
  namespace: "harbor"
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: traefik-gateway
      namespace: traefik
  hostnames:
    - harbor.alexlebens.net
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /api/
        - path:
            type: PathPrefix
            value: /service/
        - path:
            type: PathPrefix
            value: /v2/
        - path:
            type: PathPrefix
            value: /c/
      backendRefs:
        - name: harbor-core
          namespace: "harbor"
          port: 80
    - matches:
        - path:
            type: PathPrefix
            value: /
      backendRefs:
        - name: harbor-portal
          namespace: "harbor"
          port: 80
