---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: api-route
  namespace: artifactapi
spec:
  hostnames:
    - artifactapi.k8s.syd1.au.unkin.net
  parentRefs:
    # Early-boot clients (anaconda/kickstart, yum in %post, PXE) need plain HTTP
    # for the rpm repos; serve the app directly on port 80 instead of redirecting.
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: artifactapi
      sectionName: http
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: artifactapi
      sectionName: https
  rules:
    - backendRefs:
        - group: ""
          kind: Service
          name: ui
          port: 80
          weight: 1
      matches:
        - path:
            type: PathPrefix
            value: /ui
    - backendRefs:
        - group: ""
          kind: Service
          name: artifactapi
          port: 80
          weight: 1
      matches:
        - path:
            type: PathPrefix
            value: /
