smi-spec
smi-spec copied to clipboard
Does the TrafficSplit spec allow for identification of a default route for unmatched traffic?
Scenario:
- Requests with
Header X
get split 90/10 betweensvc-v1
andsvc-v2
. - Requests without
Header X
all go tosvc-v1
.
Currently we can achieve this with our implementation using a config like this:
matches:
- kind: HTTPRouteGroup
name: header-x
service: svc-v1 # this would be the default svc if the header is not matched
backends:
- service: svc-v1 # we still want to send some traffic to the default svc if the header matches
weight: 90
- service: svc-v2
weight: 10
However, per the spec, trafficsplits cannot be self-referential. We couldn't figure out a way to achieve this with the current spec definition. Is there any guidance on how to implement this while remaining SMI conformant? Or might this end up being a feature request?
Per @nicholasjackson raise a PR as we could add this.
Let's add this to the discussion in the next community call.
Just an update that I still have this on my list of tasks to do, but have not been able to get around to it yet.