apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  annotations:
    internal.istio.io/gateway-service: istio-ingressgateway.istio-system.svc.domain.suffix
    internal.istio.io/parents: Gateway/gateway/default.istio-system
  creationTimestamp: null
  name: gateway-istio-autogenerated-k8s-gateway-default
  namespace: istio-system
spec:
  servers:
  - hosts:
    - allowed-1/*.domain.example
    - allowed-2/*.domain.example
    port:
      name: default
      number: 80
      protocol: HTTP
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    internal.istio.io/parents: HTTPRoute/http.allowed-1,HTTPRoute/http.allowed-2
    internal.istio.io/route-semantics: gateway
  creationTimestamp: null
  name: http-0-istio-autogenerated-k8s-gateway
  namespace: allowed-1
spec:
  gateways:
  - istio-system/gateway-istio-autogenerated-k8s-gateway-default
  hosts:
  - a.domain.example
  http:
  - match:
    - uri:
        regex: /foo((\/).*)?
    route:
    - destination:
        host: svc2.allowed-1.svc.domain.suffix
        port:
          number: 80
  - match:
    - uri:
        prefix: /foo/bar
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      queryParams:
        my-param:
          regex: some-value
      uri:
        exact: /baz
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      uri:
        prefix: /foo
    route:
    - destination:
        host: svc1.allowed-1.svc.domain.suffix
        port:
          number: 80
  - match:
    - uri:
        prefix: /bar
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        host: svc3.allowed-2.svc.domain.suffix
        port:
          number: 80
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    internal.istio.io/parents: HTTPRoute/http.allowed-1
    internal.istio.io/route-semantics: gateway
  creationTimestamp: null
  name: http-1-istio-autogenerated-k8s-gateway
  namespace: allowed-1
spec:
  gateways:
  - istio-system/gateway-istio-autogenerated-k8s-gateway-default
  hosts:
  - b.domain.example
  http:
  - match:
    - uri:
        regex: /foo((\/).*)?
    route:
    - destination:
        host: svc2.allowed-1.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      uri:
        prefix: /foo
    route:
    - destination:
        host: svc1.allowed-1.svc.domain.suffix
        port:
          number: 80
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    internal.istio.io/parents: HTTPRoute/http.allowed-1
    internal.istio.io/route-semantics: gateway
  creationTimestamp: null
  name: http-2-istio-autogenerated-k8s-gateway
  namespace: allowed-1
spec:
  gateways:
  - mesh
  hosts:
  - a-example.allowed-1.svc.domain.suffix
  http:
  - match:
    - uri:
        regex: /foo((\/).*)?
    route:
    - destination:
        host: svc2.allowed-1.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      uri:
        prefix: /foo
    route:
    - destination:
        host: svc1.allowed-1.svc.domain.suffix
        port:
          number: 80
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    internal.istio.io/parents: HTTPRoute/http.allowed-1
    internal.istio.io/route-semantics: gateway
  creationTimestamp: null
  name: http-3-istio-autogenerated-k8s-gateway
  namespace: allowed-1
spec:
  gateways:
  - mesh
  hosts:
  - b-example.allowed-1.svc.domain.suffix
  http:
  - match:
    - uri:
        regex: /foo((\/).*)?
    route:
    - destination:
        host: svc2.allowed-1.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      uri:
        prefix: /foo
    route:
    - destination:
        host: svc1.allowed-1.svc.domain.suffix
        port:
          number: 80
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  annotations:
    internal.istio.io/parents: HTTPRoute/http.allowed-2
    internal.istio.io/route-semantics: gateway
  creationTimestamp: null
  name: http-0-istio-autogenerated-k8s-gateway
  namespace: allowed-2
spec:
  gateways:
  - mesh
  hosts:
  - a-example.allowed-2.svc.domain.suffix
  http:
  - match:
    - uri:
        prefix: /foo/bar
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - headers:
        my-header:
          exact: some-value
      queryParams:
        my-param:
          regex: some-value
      uri:
        exact: /baz
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - uri:
        prefix: /bar
    route:
    - destination:
        host: svc2.allowed-2.svc.domain.suffix
        port:
          number: 80
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        host: svc3.allowed-2.svc.domain.suffix
        port:
          number: 80
---
