In API gateway or service mesh as Istio, Gloo,... I can use virtual service to split traffic via header. How can I do it with maesh?
Thanks for your interest in Maesh
This feature is not available in
v1.3.0 but it will be available in the upcoming version.
Thanks for your reply.
I want to split traffic as following:
- When I call to service point with header "stage: canary", maesh will route traffic to service v2
ex: curl service.namespace.maesh -H "stage: canary" ---> service v2
- When I call to service endpoint with path "/api", maesh will route traffic to service v1
ex: curl service.ns.maesh/api ---> service v1.
How can I do it?
I haven't tested the following configuration but maybe you can try something like this (pseudo config):
TrafficSplit: service: base rules: HTTPRouteGroup(header: stage=canary) backends: service-v2: weight=100 TrafficSplit: service: base rules: HTTPRouteGroup(path: /api) backends: service-v1: weight=100
Hope this helps.