istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/testdata/config/rule-regex-route.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: ServiceEntry 3 metadata: 4 name: regex-extsvc 5 namespace: testns 6 spec: 7 hosts: 8 - regex.extsvc.com 9 ports: 10 - number: 9003 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: regex 30 namespace: testns 31 spec: 32 host: regex.extsvc.com 33 subsets: 34 - name: v1 35 labels: 36 version: v1 37 - name: v2 38 labels: 39 version: v2 40 --- 41 apiVersion: networking.istio.io/v1alpha3 42 kind: VirtualService 43 metadata: 44 name: regex-route 45 namespace: testns 46 spec: 47 hosts: 48 - regex.extsvc.com 49 http: 50 - match: 51 - headers: 52 foo: 53 regex: "b.*" 54 sourceLabels: 55 version: v1 56 route: 57 - destination: 58 host: regex.extsvc.com 59 subset: v2 60 weight: 100 61 - route: 62 - destination: 63 host: regex.extsvc.com 64 subset: v1 65 weight: 100