istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/virtualservice_dupmatches.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: VirtualService 3 metadata: 4 name: sample-foo-cluster01 5 namespace: foo 6 spec: 7 hosts: 8 - sample.foo.svc.cluster.local 9 http: 10 - fault: 11 delay: 12 fixedDelay: 5s 13 percentage: 14 value: 100 15 route: 16 - destination: 17 host: sample.foo.svc.cluster.local 18 - mirror: 19 host: sample.bar.svc.cluster.local 20 route: 21 - destination: 22 host: sample.bar.svc.cluster.local 23 subset: v1 24 --- 25 apiVersion: networking.istio.io/v1alpha3 26 kind: VirtualService 27 metadata: 28 name: duplicate-match 29 spec: 30 hosts: 31 - sample.baz.svc.cluster.local 32 http: 33 - name: send /api/v1/products to sample.foo 34 match: 35 - name: prefix /api/v1/products 36 uri: 37 prefix: /api/v1/products 38 route: 39 - destination: 40 host: sample.foo.svc.cluster.local 41 - name: send /api/v1/products to sample.bar 42 match: 43 - uri: 44 prefix: /api/v1/products 45 route: 46 - destination: 47 host: sample.bar.svc.cluster.local 48 subset: v1 49 --- 50 apiVersion: networking.istio.io/v1alpha3 51 kind: VirtualService 52 metadata: 53 name: almost-duplicate-match 54 spec: 55 hosts: 56 - sample.bar.svc.cluster.local 57 http: 58 - match: 59 - uri: 60 prefix: /api/v1/products 61 route: 62 - destination: 63 host: sample.foo.svc.cluster.local 64 - name: send /api/v1/products and /potato to sample.bar 65 match: 66 - name: prefix /api/v1/products 67 uri: 68 prefix: /api/v1/products 69 - name: prefix /potato 70 uri: 71 prefix: /potato 72 route: 73 - destination: 74 host: sample.bar.svc.cluster.local 75 subset: v1 76 --- 77 --- 78 apiVersion: networking.istio.io/v1alpha3 79 kind: VirtualService 80 metadata: 81 name: duplicate-tcp-match 82 spec: 83 hosts: 84 - "*" 85 gateways: 86 - tcp-echo-gateway 87 tcp: 88 - match: 89 - port: 31400 90 route: 91 - destination: 92 host: tcp-echo 93 port: 94 number: 9000 95 subset: v1 96 - match: 97 - port: 31400 98 route: 99 - destination: 100 host: tcp-echo 101 port: 102 number: 9000 103 subset: v2 104 --- 105 apiVersion: networking.istio.io/v1alpha3 106 kind: VirtualService 107 metadata: 108 name: duplicate-empty-tcp 109 spec: 110 hosts: 111 - "*" 112 gateways: 113 - tcp-echo-gateway 114 tcp: 115 - route: 116 - destination: 117 host: tcp-echo 118 port: 119 number: 9000 120 subset: v1 121 - route: 122 - destination: 123 host: tcp-echo 124 port: 125 number: 9000 126 subset: v2 127 --- 128 apiVersion: networking.istio.io/v1alpha3 129 kind: VirtualService 130 metadata: 131 name: almost-duplicate-tcp-match 132 spec: 133 hosts: 134 - "*" 135 gateways: 136 - tcp-echo-gateway 137 tcp: 138 - match: 139 - port: 31400 140 route: 141 - destination: 142 host: tcp-echo 143 port: 144 number: 9000 145 subset: v1 146 - match: 147 - port: 31400 148 - port: 31401 149 route: 150 - destination: 151 host: tcp-echo 152 port: 153 number: 9000 154 subset: v2 155 --- 156 apiVersion: networking.istio.io/v1alpha3 157 kind: VirtualService 158 metadata: 159 name: tls-routing 160 namespace: none 161 spec: 162 hosts: 163 - www1.googleapis.com 164 - api1.facebook.com 165 tls: 166 - match: 167 - port: 2443 168 sniHosts: 169 - www1.googleapis.com 170 route: 171 - destination: 172 host: www1.googleapis.com 173 - match: 174 - port: 2443 175 sniHosts: 176 - www1.googleapis.com 177 route: 178 - destination: 179 host: api1.facebook.com 180 --- 181 apiVersion: networking.istio.io/v1alpha3 182 kind: VirtualService 183 metadata: 184 name: tls-routing-almostmatch 185 namespace: none 186 spec: 187 hosts: 188 - www1.example.com 189 tls: 190 - match: 191 - port: 2443 192 sniHosts: 193 - www1.example.com 194 route: 195 - destination: 196 host: www1.googleapis.com 197 - match: 198 - port: 2443 199 sniHosts: 200 - www1.example.com 201 - port: 8443 202 sniHosts: 203 - www1.example.com 204 route: 205 - destination: 206 host: api1.facebook.com