Open Ferdudas97 opened 1 week ago
cc @ravenblackx @kyessenov I'm not sure the current state of the art of enhanced matching but would that help here in any way?
I think a MatcherTree can help with this, but it's a bit tricky to generate because at the base level you ~must have prefix/exact path matches for the tree, and some routes may want to e.g. use a regular expression for the path, which means you have to roll all those ones into a sub-matcher on the "no match" branch of the base tree.
There is definitely or_matcher
in the Predicate message, so it should be feasible to do the sort of matching that's needed (and I guess you don't have to use a MatcherTree
at the base, a MatcherList
should more closely mimic the pre-tree behavior while still allowing custom predicates.)
List of matchers for route: Route should have list of matchers instead of one match
Description: Current api forces Istio (and other control planes) to create many duplicated routes with different matchers but the same route actions. Having possibility to specify list of match rules (OR operation between all rules) would simplify a envoy config and reduce used memory.
Istio Example
Route config from Istio virtual service
produces 3 routes, with only different matchers