I am using Istio 1.2.2 and have two namespaces.
application:
- serviceA
- serviceB
- Virtual Service C -> B
- gateway: mesh
- host: serviceC.external.svc.cluster.local
- destination: serviceB.application.svc.cluster.local
- exportTo: . (same namespace)
external:
- serviceC
- Virtual Service C -> C
- gateway: mesh
- host: serviceC.external.svc.cluster.local
- destination: serviceC.external.svc.cluster.local
- exportTo: * (all namespaces)
Question: Which Virtual Service handles request form serviceA to serviceC.external.svc.cluster.local? Is there any priority?
Istio says “A VirtualService can only be fragmented this way if it is bound to a gateway. Host merging is not supported in sidecars.”
I’ve tried to reproduce this situation and Virtual Service C -> B handles request and routs it to ServiceB.
Can we rely on this behavior or it is undocumented?