istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/xds/testdata/benchmarks/virtualservice.yaml (about)

     1  # Set up a Service associated with our proxy, which will run as 1.1.1.1 IP
     2  apiVersion: networking.istio.io/v1alpha3
     3  kind: ServiceEntry
     4  metadata:
     5    name: proxy-service-instance
     6  spec:
     7    hosts:
     8    - example.com
     9    ports:
    10    - number: 80
    11      name: http
    12      protocol: HTTP
    13    resolution: STATIC
    14    endpoints:
    15    - address: 1.1.1.1
    16  ---
    17  # Set up .Services VirtualServices, each pointing to a different Service
    18  {{- range $i := until .Services }}
    19  apiVersion: networking.istio.io/v1alpha3
    20  kind: VirtualService
    21  metadata:
    22    name: vs-{{$i}}
    23  spec:
    24    hosts:
    25      - random-{{$i}}.host.example
    26    http:
    27    - name: "match-route"
    28      match:
    29      - uri:
    30          prefix: "/foo"
    31      - uri:
    32          regex: "/bar"
    33      rewrite:
    34        uri: "/new-url"
    35      route:
    36        - destination:
    37            host: random-{{$i}}.host.example
    38  ---
    39  apiVersion: networking.istio.io/v1alpha3
    40  kind: ServiceEntry
    41  metadata:
    42    name: service-{{$i}}
    43  spec:
    44    hosts:
    45    - random-{{$i}}.host.example
    46    ports:
    47    - number: 80
    48      name: http
    49      protocol: HTTP
    50    resolution: STATIC
    51    endpoints:
    52    - address: 1.2.3.4
    53  ---
    54  {{- end }}