apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
  name: gatewayapi3
spec:
  gatewayClassName: istio
  listeners:
  - name: default
    protocol: HTTP
    port: 80
    allowedRoutes:
      namespaces:
        from: All
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: Gateway
metadata:
  name: gatewayapi2
  labels:
    app: gatewayapi
spec:
  gatewayClassName: istio
  listeners:
  - name: default
    hostname: "bookinfo-istio-system.apps.ocp4-kqe1.maistra.upshift.redhat.com"
    port: 80
    protocol: HTTP
    allowedRoutes:
      namespaces:
        from: All
  addresses:
    - type: Hostname
      value: "google.com"
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
  name: httproute2
spec:
  parentRefs:
  - name: gatewayapi
    namespace: istio-system
  hostnames: ["bookinfo2-istio-system.apps.ocp4-kqe1.maistra.upshift.redhat.com"]
  rules:
  - matches:
    - path:
        value: /productpage
    - path:
        value: /get
    forwardTo:
    - serviceName: productpage
      port: 9080
  gateways:
    allow: All
