istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/testdata/config/rule-fault-injection.yaml (about)

     1  apiVersion: networking.istio.io/v1alpha3
     2  kind: ServiceEntry
     3  metadata:
     4    name: fault
     5    namespace: testns
     6  spec:
     7     hosts:
     8     - fault.test.istio.io
     9     ports:
    10     - number: 8080
    11       name: http
    12       protocol: HTTP
    13     resolution: STATIC
    14     endpoints:
    15      - address: 127.0.0.2
    16        ports:
    17          http: 8080
    18        labels:
    19          version: v1
    20      - address: 127.0.0.3
    21        ports:
    22          http: 8081
    23        labels:
    24          version: v2
    25  ---
    26  apiVersion: networking.istio.io/v1alpha3
    27  kind: DestinationRule
    28  metadata:
    29    name: fault
    30    namespace: testns
    31  spec:
    32    host: c-weighted.extsvc.com
    33    subsets:
    34      - name: v1
    35        labels:
    36          version: v1
    37      - name: v2
    38        labels:
    39          version: v2
    40  
    41  ---
    42  apiVersion: networking.istio.io/v1alpha3
    43  kind: VirtualService
    44  metadata:
    45    name: fault
    46    namespace: testns
    47  spec:
    48    hosts:
    49      - fault.test.istio.io
    50    http:
    51      - match:
    52        - headers:
    53            version:
    54              exact: v2
    55          sourceLabels:
    56            version: v1
    57        route:
    58        - destination:
    59            host: c
    60            subset: v2
    61          weight: 100
    62        fault:
    63          delay:
    64            percentage:
    65              value: 100.0
    66            fixedDelay: 5s
    67          abort:
    68            percentage:
    69              value: 100.0
    70            httpStatus: 503