istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/integration/pilot/testdata/a.yaml (about)

     1  apiVersion: networking.istio.io/v1alpha3
     2  kind: VirtualService
     3  metadata:
     4    name: a
     5  spec:
     6    hosts:
     7    - a
     8    http:
     9    # (This 'match' clause started as a work-around, because WaitUntilCallable() times out if
    10    # all destinations have a subset.  We are now using it for testing.)
    11    - match:
    12      - headers:
    13          end-user:
    14            exact: jason
    15      route:
    16      - destination:
    17          host: a
    18    # Fallthrough
    19    - route:
    20      - destination:
    21          host: a
    22          subset: v1
    23  ---
    24  apiVersion: networking.istio.io/v1alpha3
    25  kind: DestinationRule
    26  metadata:
    27    name: a
    28  spec:
    29    host: a
    30    subsets:
    31    - name: v1
    32      labels:
    33        version: v1
    34  ---
    35  apiVersion: security.istio.io/v1beta1
    36  kind: AuthorizationPolicy
    37  metadata:
    38    name: integ-test
    39  spec:
    40    rules:
    41    - from:
    42      - source:
    43          principals: ["cluster.local/ns/default/sa/sleep"]
    44      to:
    45      - operation:
    46          methods: ["GET"]
    47      when:
    48      - key: request.headers[version]
    49        values: ["v1", "v2"]