I'm wondering if Istio is a good tool to support a particular routing situation, and if not (or even if it is), what other approaches are available.
So when X sends requests, it must determine for the user it is sending the request ("bob"), which subset of Y can that particular request be sent to?
In Istio, there are examples of a routing rule that is associated with a user by looking at the HTTP headers. For the sever side, Y, would I simply have code in Y that calls the k8s API to add and remove labels against the replicas Pod?
e.g.,
Service-Y.Pod-1.Labels = {
"user-bob": "true",
"user-jane": "true",
...
}
Unclear how well labels handle this, or if this kind of routing should be lifted up to the application layer rather than trying to encode it in a largely transparent service mesh layer.
You have the open API from K8s. You can make some code which will add a label to pods and then route this traffic to your pods.