I have two VirtualService objects… one that does a 20-80 traffic split and another that looks for a header.
They work when accessing my service through the Ingress gateway. When I add the header, I can see it going to the correct subset all the time. And when I don’t have it, I can see the 20-80 traffic split happening. All good there.
However, when I access the service internally (e.g. from inside another service’s container: curl helloworld:5000/hello), while the traffic split is still happening from what I can tell, the header rule is not taking effect. When I add the header, I can see it in the curl verbose output, but it does not affect the routing. It just goes and applies the 20-80 traffic split.
Could there be a bug with internal calls when there’s more than one virtual service involved?
Thanks. It still doesn’t work though when I have two separate VirtualService objects. See below. The second one looks for a header. It does not take effect when I hit the service from another pod in the cluster (it just does the traffic split). But it works great if I hit it from the outside (it always goes to v2). Both of them have “mesh” as one of their gateways. When I combine them into one VirtualService, the header rule works in both scenarios.
Thanks. But I have no problem with a single VirtualService object. My challenge is with more than one. For now, I’ve come to terms with that limitation when making intra-cluster calls. But I’m hoping that the Istio developers here can chime in re the plan (or the lack thereof) for fixing it.