-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expression/ATC router in KIC #3730
Comments
Functionality without expression support planned There are several features we do not intend to support with expressions or may skip if possible:
Split expression building for rules and annotations The way we split route construction between the translators and annotation system introduces some complication to expression building. Rather than having a dedicated field we can set independently for, say, methods, we need to combine a matcher we built earlier with additional criteria. This should be fine (though we do need to keep the original matcher around, not convert it to a string immediately), since annotation criteria must apply to the entire route resource, whereas the translators build off rules within it, and can AND the annotation criteria with an ORed set of rule expressions. You'd get something like
Implementation strategy To implement translation to expressions, Tao and I developed two approaches in our PoCs: I built a partial implementation that builds matchers (the struct addedin #3780) immediately, and composes them over time as they are returned up the stack and passed on to further steps. In the example, it builds an ORed set of each HTTPRouteRoute in a rule, and would then OR each compatible (same service, etc.) rule together, and would later AND each set of rules with any annotation criteria (the latter two of these steps still need to be built). Tao built an additional intermediate Our initial thoughts are that directly building the match expressions is a bit simpler (we do not have to manage both translation to the intermediate and from the intermediate to matchers), but would present a problem if we found something that required modifying matchers within the tree. Although we're not converting to strings immediately, once we've returned a complete matcher from some part of the path, we lose the original source structure that resulted in it. We need further experimentation to determine if this is something we would need to do in practice: something like annotations do not need to apply piecemeal to only a subset of rules sourced from an Ingress. |
Closing this issue - KIC 2.10 is shipping basic feature-gated expression router support for L7 routes; further versions will take care of setting priorities (#3958), L4 proxying (blocked by Gateway not supporting stream listeners in ATC router mode) and graduation to GA. |
Is there an existing issue for this?
Problem Statement
KIC today can work with Kong's
traditional
andtraditional-compatible
router flavors today.In particular, (KIC at the moment of writing - 2.9.0-rc.1) does not work with the expression/
atc
router flavor.This issue tracks the design phase of supporting the
atc
router flavor in KIC.Proposed Solution
One possible implementation known to us today:
Abstract the part of the
translate
logic that buildsRoute
objects away.Introduce a second implementation (alongside the existing one that yields
Route
match criteria inRoute fields
) that builds theexpression
.Additional information
Sub-issues:
Implement translators
netv1.Ingress
,netv1beta1.Ingress
,knative.Ingress
: Translate ingress into expression based routes #3750HTTPRoute
in gateway API: Translate HTTPRoute into expression based routes #3751GRPCRoute
in gateway API: Translate GRPCRoute to expression based routes #3752Acceptance Criteria
atc
router exists (introducing the alternative implementation, switching over, likely also phasing old the old one)The text was updated successfully, but these errors were encountered: