istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/config/analysis/analyzers/testdata/virtualservice_destinationrules.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: DestinationRule 3 metadata: 4 name: reviews 5 namespace: default 6 spec: 7 host: reviews 8 subsets: 9 - labels: 10 version: v1 11 name: v1 12 --- 13 apiVersion: networking.istio.io/v1alpha3 14 kind: VirtualService 15 metadata: 16 name: reviews 17 namespace: default 18 spec: 19 http: 20 - route: 21 - destination: # This virtualservice has no validation errors (base case) 22 host: reviews 23 subset: v1 24 --- 25 apiVersion: networking.istio.io/v1alpha3 26 kind: VirtualService 27 metadata: 28 name: reviews-bogussubset 29 namespace: default 30 spec: 31 http: 32 - route: 33 - destination: 34 host: reviews 35 subset: bogus # This subset does not exist, should result in a validation error 36 --- 37 apiVersion: networking.istio.io/v1alpha3 38 kind: VirtualService 39 metadata: 40 name: reviews-fqdn 41 namespace: default 42 spec: 43 http: 44 - route: 45 - destination: 46 host: reviews.default.svc.cluster.local # FQDN representation is valid and should not generate an error 47 subset: v1 48 --- 49 apiVersion: networking.istio.io/v1alpha3 50 kind: VirtualService 51 metadata: 52 name: reviews-mirror 53 namespace: default 54 spec: 55 http: 56 - route: 57 - destination: 58 host: reviews 59 subset: v1 60 mirror: # Includes mirroring, but should not generate any errors 61 host: reviews 62 subset: v1 63 --- 64 apiVersion: networking.istio.io/v1alpha3 65 kind: VirtualService 66 metadata: 67 name: reviews-mirror-bogussubset 68 namespace: default 69 spec: 70 http: 71 - route: 72 - destination: 73 host: reviews 74 subset: v1 75 mirror: 76 host: reviews 77 subset: bogus # This subset does not exist, should result in a validation error