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

     1  apiVersion: networking.istio.io/v1beta1
     2  kind: VirtualService
     3  metadata:
     4    name: productpage
     5    namespace: foo
     6  spec:
     7    hosts:
     8    - '*.productpage' # should generate an error as this conflicts with VirtualService bar/productpage
     9    http:
    10    - route:
    11      - destination:
    12          host: productpage
    13  ---
    14  apiVersion: networking.istio.io/v1beta1
    15  kind: VirtualService
    16  metadata:
    17    name: productpage
    18    namespace: bar
    19  spec:
    20    hosts:
    21    - '*.productpage' # should generate an error as this conflicts with VirtualService foo/productpage
    22    http:
    23    - route:
    24      - destination:
    25          host: productpage
    26  ---
    27  apiVersion: networking.istio.io/v1beta1
    28  kind: VirtualService
    29  metadata:
    30    name: productpage-b
    31    namespace: foo
    32  spec:
    33    hosts:
    34    - '*.productpage.b' # should not generate an error as this conflicts with VirtualService bar/productpage-b
    35    exportTo:
    36    - foo
    37    http:
    38    - route:
    39      - destination:
    40          host: productpage
    41  ---
    42  apiVersion: networking.istio.io/v1beta1
    43  kind: VirtualService
    44  metadata:
    45    name: productpage-b
    46    namespace: bar
    47  spec:
    48    hosts:
    49    - '*.productpage.b' # should not generate an error as this conflicts with VirtualService foo/productpage-b
    50    exportTo:
    51    - '.'
    52    http:
    53    - route:
    54      - destination:
    55          host: productpage
    56  ---
    57  apiVersion: networking.istio.io/v1beta1
    58  kind: VirtualService
    59  metadata:
    60    name: productpage-c
    61    namespace: foo
    62  spec:
    63    hosts:
    64    - '*.productpage.c' # should generate an error as this conflicts with VirtualService bar/productpage-c
    65    exportTo:
    66    - foo
    67    http:
    68    - route:
    69      - destination:
    70          host: productpage
    71  ---
    72  apiVersion: networking.istio.io/v1beta1
    73  kind: VirtualService
    74  metadata:
    75    name: productpage-c
    76    namespace: bar
    77  spec:
    78    hosts:
    79    - '*.productpage.c' # should not generate an error as this conflicts with VirtualService foo/productpage-c
    80    exportTo:
    81    - '*' # export to all namespaces
    82    http:
    83    - route:
    84      - destination:
    85          host: productpage
    86  ---
    87  apiVersion: networking.istio.io/v1beta1
    88  kind: VirtualService
    89  metadata:
    90    name: productpage-d
    91    namespace: foo
    92  spec:
    93    hosts:
    94    - '*.productpage.d' # should generate an error as this conflicts with VirtualService bar/productpage-d
    95    exportTo:
    96    - '.'
    97    http:
    98    - route:
    99      - destination:
   100          host: productpage
   101  ---
   102  apiVersion: networking.istio.io/v1beta1
   103  kind: VirtualService
   104  metadata:
   105    name: productpage-d
   106    namespace: bar
   107  spec:
   108    hosts:
   109    - '*.d' # should not generate an error as this conflicts with VirtualService foo/productpage-d
   110    exportTo:
   111    - '*' # export to all namespaces
   112    http:
   113    - route:
   114      - destination:
   115          host: productpage
   116  ---