smi-spec icon indicating copy to clipboard operation
smi-spec copied to clipboard

Does the TrafficSplit spec allow for identification of a default route for unmatched traffic?

Open jbyers19 opened this issue 3 years ago • 3 comments

Scenario:

  • Requests with Header X get split 90/10 between svc-v1 and svc-v2.
  • Requests without Header X all go to svc-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?

jbyers19 avatar Dec 08 '21 23:12 jbyers19

Per @nicholasjackson raise a PR as we could add this.

bridgetkromhout avatar Jan 12 '22 18:01 bridgetkromhout

Let's add this to the discussion in the next community call.

bridgetkromhout avatar Jan 12 '22 18:01 bridgetkromhout

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.

jbyers19 avatar Mar 02 '22 18:03 jbyers19