istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/testdata/config/virtual-service-all.yaml (about)

     1  apiVersion: networking.istio.io/v1alpha3
     2  kind: VirtualService
     3  metadata:
     4    name: all
     5    namespace: testns
     6  spec:
     7    hosts:
     8    - service3.default.svc.cluster.local
     9    - uk.bookinfo.com
    10    - eu.bookinfo.com
    11    gateways:
    12    - my-gateway
    13    - mesh # applies to all the sidecars in the mesh
    14    http:
    15    - match:
    16      - headers:
    17          cookie:
    18            regex: "^(.*?;)?(user=dev-123)(;.*)?"
    19      route:
    20      - destination:
    21          port:
    22            number: 81
    23          host: service3.default.svc.cluster.local
    24    - match:
    25      - uri:
    26          prefix: /reviews/
    27      route:
    28      - destination:
    29          port:
    30            number: 81
    31          host: service3.default.svc.cluster.local
    32          subset: v1
    33        weight: 80
    34      - destination:
    35          host: service3.default.svc.cluster.local
    36          subset: v2
    37        weight: 20