kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: prow
  annotations:
    networking.gke.io/certmap: prow-certificates
spec:
  gatewayClassName: gke-l7-global-external-managed
  listeners:
  - name: http
    protocol: HTTP
    port: 80
  - name: https
    protocol: HTTPS
    port: 443
  addresses:
  - type: NamedAddress
    value: prow-ingress-v4
  - type: NamedAddress
    value: prow-ingress-v6
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: prow
spec:
  parentRefs:
  - name: prow
    sectionName: https
  hostnames:
  - "prow.k8s.io"
  rules:
  - matches:
    - path:
        value: /
    backendRefs:
    - name: deck
      port: 80
  - matches:
    - path:
        value: /hook
    backendRefs:
    - name: hook
      port: 8888
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: prow-hooks
spec:
  parentRefs:
  - name: prow
    sectionName: https
  hostnames:
  - hooks.prow.k8s.io
  rules:
  - backendRefs:
    - name: hook
      port: 8888
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: https-redirect
spec:
  parentRefs:
  - name: prow
    sectionName: http
  rules:
  - filters:
    - type: RequestRedirect
      requestRedirect:
        scheme: https
