istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/virtualservice_gateways.yaml (about)

     1  # Broken config in a yaml config file
     2  #
     3  apiVersion: networking.istio.io/v1alpha3
     4  kind: Gateway
     5  metadata:
     6    name: httpbin-gateway
     7  spec:
     8    selector:
     9      istio: ingressgateway
    10  ---
    11  apiVersion: networking.istio.io/v1alpha3
    12  kind: Gateway
    13  metadata:
    14    name: crossnamespace-gw
    15    namespace: another
    16  spec:
    17    selector:
    18      istio: ingressgateway
    19  ---
    20  apiVersion: networking.istio.io/v1alpha3
    21  kind: VirtualService
    22  metadata:
    23    name: httpbin
    24  spec:
    25    hosts:
    26    - "*"
    27    gateways:
    28    - httpbin-gateway # Expected: no validation error since this gateway exists
    29  ---
    30  apiVersion: networking.istio.io/v1alpha3
    31  kind: VirtualService
    32  metadata:
    33    name: httpbin-bogus
    34  spec:
    35    hosts:
    36    - "*"
    37    gateways:
    38    - httpbin-gateway-bogus # Expected: validation error since this gateway does not exist
    39  ---
    40  apiVersion: networking.istio.io/v1alpha3
    41  kind: VirtualService
    42  metadata:
    43    name: httpbin-mesh
    44  spec:
    45    hosts:
    46    - "*"
    47    gateways:
    48    - mesh # Expected: no validation error, "mesh" is a special-case value
    49  ---
    50  apiVersion: networking.istio.io/v1alpha3
    51  kind: VirtualService
    52  metadata:
    53    name: cross-test
    54    namespace: default
    55  spec:
    56    hosts:
    57    - "*"
    58    gateways:
    59    - another/crossnamespace-gw  # No validation error expected