kind: HTTPRoute
apiVersion: networking.x-k8s.io/v1alpha1
metadata:
  name: sample-app-route
  namespace: mcgi-bg
  labels:
    gateway: multi-cluster-gateway
spec:
  rules:
  - forwardTo:
    - backendRef: 
        group: net.gke.io
        kind: ServiceImport
        name: sample-app # no longer cluster-specific
      port: 8080
      weight: 100
  - matches:
    - headers:
        type: Exact
        values:
          cluster: cluster-blue # this header goes to blue cluster
    forwardTo:
    - backendRef: 
        group: net.gke.io
        kind: ServiceImport
        name: sample-app-blue
      port: 8080
  - matches:
    - headers:
        type: Exact
        values:
          cluster: cluster-green # this header goes to green cluster
    forwardTo:
    - backendRef: 
        group: net.gke.io
        kind: ServiceImport
        name: sample-app-green
      port: 8080
