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

     1  ---
     2  apiVersion: networking.istio.io/v1beta1
     3  kind: Gateway
     4  metadata:
     5    name: testing-gateway-01-test-01
     6    namespace: istio-system
     7  spec:
     8    selector:
     9      istio: ingressgateway
    10    servers:
    11    - hosts:
    12      - testing-01.com
    13      port:
    14        name: http
    15        number: 80
    16        protocol: HTTP
    17  ---
    18  apiVersion: networking.istio.io/v1beta1
    19  kind: VirtualService
    20  metadata:
    21    name: testing-service-01-test-01
    22    namespace: default
    23  spec:
    24    gateways:
    25    - istio-system/testing-gateway-01-test-01
    26    hosts:
    27    - testing-01.com # Expected: no validation error since this host exists
    28    http:
    29    - match:
    30      - uri:
    31          prefix: /
    32      route:
    33      - destination:
    34          host: ratings
    35  ---
    36  apiVersion: networking.istio.io/v1beta1
    37  kind: VirtualService
    38  metadata:
    39    name: testing-service-02-test-01
    40    namespace: default
    41  spec:
    42    gateways:
    43    - istio-system/testing-gateway-01-test-01
    44    hosts:
    45    - wrong-01.com # Expected: validation error since this host does not exist
    46    http:
    47    - match:
    48      - uri:
    49          prefix: /
    50      route:
    51      - destination:
    52          host: ratings
    53  ---
    54  apiVersion: networking.istio.io/v1beta1
    55  kind: Gateway
    56  metadata:
    57    name: testing-gateway-01-test-02
    58    namespace: istio-system
    59  spec:
    60    selector:
    61      istio: ingressgateway
    62    servers:
    63    - hosts:
    64      - '*.testing-02.com'
    65      port:
    66        name: http
    67        number: 80
    68        protocol: HTTP
    69  ---
    70  apiVersion: networking.istio.io/v1beta1
    71  kind: VirtualService
    72  metadata:
    73    name: testing-service-01-test-02
    74    namespace: default
    75  spec:
    76    gateways:
    77    - istio-system/testing-gateway-01-test-02
    78    hosts:
    79    - 'web.testing-02.com' # Expected: no validation error since this host match the wildcard
    80    http:
    81    - match:
    82      - uri:
    83          prefix: /
    84      route:
    85      - destination:
    86          host: ratings
    87  ---
    88  apiVersion: networking.istio.io/v1beta1
    89  kind: VirtualService
    90  metadata:
    91    name: testing-service-02-test-02
    92    namespace: default
    93  spec:
    94    gateways:
    95    - istio-system/testing-gateway-01-test-02
    96    hosts:
    97    - 'web.wrong.com' # Expected: validation error since this host does not exist
    98    http:
    99    - match:
   100      - uri:
   101          prefix: /
   102      route:
   103      - destination:
   104          host: ratings
   105  ---
   106  apiVersion: networking.istio.io/v1beta1
   107  kind: Gateway
   108  metadata:
   109    name: testing-gateway-01-test-03
   110    namespace: istio-system
   111  spec:
   112    selector:
   113      istio: ingressgateway
   114    servers:
   115    - hosts:
   116      - '*.api.testing-03.com'
   117      port:
   118        name: http
   119        number: 80
   120        protocol: HTTP
   121  ---
   122  apiVersion: networking.istio.io/v1beta1
   123  kind: Gateway
   124  metadata:
   125    name: testing-gateway-02-test-03
   126    namespace: istio-system
   127  spec:
   128    selector:
   129      istio: ingressgateway
   130    servers:
   131    - hosts:
   132      - '*.homepage.testing-03.com'
   133      port:
   134        name: http
   135        number: 80
   136        protocol: HTTP
   137  ---
   138  apiVersion: networking.istio.io/v1beta1
   139  kind: VirtualService
   140  metadata:
   141    name: testing-service-01-test-03
   142    namespace: default
   143  spec:
   144    gateways:
   145    - istio-system/testing-gateway-01-test-03
   146    - istio-system/testing-gateway-02-test-03
   147    hosts:
   148    - 'user.api.testing-03.com'
   149    - 'profile.homepage.testing-03.com' # Expected: no validation error since this host match the wildcard
   150    http:
   151    - match:
   152      - uri:
   153          prefix: /
   154      route:
   155      - destination:
   156          host: ratings
   157  ---
   158  apiVersion: networking.istio.io/v1beta1
   159  kind: VirtualService
   160  metadata:
   161    name: testing-service-02-test-03
   162    namespace: default
   163  spec:
   164    gateways:
   165    - istio-system/testing-gateway-01-test-03
   166    - istio-system/testing-gateway-02-test-03
   167    hosts:
   168    - 'user.api.testing-03.com' # Expected: validation error since this host does not exist
   169    http:
   170    - match:
   171      - uri:
   172          prefix: /
   173      route:
   174      - destination:
   175          host: ratings
   176  ---
   177  apiVersion: networking.istio.io/v1beta1
   178  kind: Gateway
   179  metadata:
   180    name: testing-gateway-01-test-04
   181    namespace: istio-system
   182  spec:
   183    selector:
   184      istio: ingressgateway
   185    servers:
   186    - hosts:
   187      - '*.testing-01-04.com'
   188      port:
   189        name: http
   190        number: 80
   191        protocol: HTTP
   192    - hosts:
   193      - 'web.testing-02-04.com'
   194      port:
   195        name: http
   196        number: 80
   197        protocol: HTTP
   198  ---
   199  apiVersion: networking.istio.io/v1beta1
   200  kind: VirtualService
   201  metadata:
   202    name: testing-service-01-test-04
   203    namespace: default
   204  spec:
   205    gateways:
   206    - istio-system/testing-gateway-01-test-04
   207    hosts:
   208    - 'web.testing-02-04.com' # Expected: no validation error since this host exists
   209    http:
   210    - match:
   211      - uri:
   212          prefix: /
   213      route:
   214      - destination:
   215          host: ratings
   216  ---
   217  apiVersion: networking.istio.io/v1beta1
   218  kind: VirtualService
   219  metadata:
   220    name: testing-service-02-test-04
   221    namespace: default
   222  spec:
   223    gateways:
   224    - istio-system/testing-gateway-01-test-04
   225    hosts:
   226    - 'profile.user.testing-01-04.com' # Expected: no validation error since this host match the wildcard
   227    http:
   228    - match:
   229      - uri:
   230          prefix: /
   231      route:
   232      - destination:
   233          host: ratings
   234  ---
   235  apiVersion: networking.istio.io/v1beta1
   236  kind: VirtualService
   237  metadata:
   238    name: testing-service-03-test-04
   239    namespace: default
   240  spec:
   241    gateways:
   242    - istio-system/testing-gateway-01-test-04
   243    hosts:
   244    - 'user.testing-02-04.com'
   245    - 'users.testing-02-04.com' # Expected: validation error since this host does not exist
   246    http:
   247    - match:
   248      - uri:
   249          prefix: /
   250      route:
   251      - destination:
   252          host: ratings