Repository navigation
GEP-5224: Pre-Routing Filters (provisional)- #5224 - #5235
Conversation
- needs revision before review Signed-off-by: Jackie Elliott <jaellio@microsoft.com>
Signed-off-by: Jackie Elliott <jaellio@microsoft.com>
|
Hi @jaellio. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
|
||
| > "Filters define the filters that are applied to requests that match this | ||
| > rule." | ||
| > β `HTTPRouteRule.Filters`, [apis/v1/httproute_types.go](../../apis/v1/httproute_types.go) |
There was a problem hiding this comment.
Since we want to optimize for people that read via website, I'd recommend linking to reference docs instead of a relative link like this
| **pre-routing filters**, processing that runs before route selection and may | ||
| influence it, and that this belongs in the Gateway API family of APIs rather | ||
| than only in implementation-specific extensions or out-of-band components. |
There was a problem hiding this comment.
Not a blocker for this PR, but something we'll need to figure out as we define the API:
Is this attached after any request matching? IE technically Gateway Listeners match requests on port, protocol, and hostname. Presumably, some pre-routing filters could modify any of those attributes of a request. If that's so, I think we'd be left with several options:
- Consider an attachment point above listener
- Consider ways that we could consider some of these request attributes immutable
- Allow mutation but note that it does not affect listener matching
- Allow mutation and reprocess listener matching after each filter
To be clear, this does not need to be solved in this PR, just starting the discussion in advance of the next PR since we're trying to move quickly here.
There was a problem hiding this comment.
I tend to favor putting this config at the Listener level.
That has the advantage that we can assume the protocol has already matched, and define what filters work by protocol rather than in some other way. If we put prerouting filters above listener (that is, option 1), then the definition will need to reference what protocols it's valid for anyway (since HTTP filters will only be valid for UDP traffic if that traffic is also QUIC/HTTP3, for example).
But agreed, this should be part of the discussion around API design once we merge this step.
There was a problem hiding this comment.
Also lets you filter by hostname. Not sure how that interacts with some of our "hostname intersection" discussions though.
There was a problem hiding this comment.
Or put it the opposite way - if we cannot let it filter by hostname on the listener, it cannot attach to listener, since then it would not be functioning correctly. So hopefully it can since there are some very nice properties to match on listener! This is how we do it in AGW fwiw
|
/ok-to-test |
| * **Selecting a concrete API shape.** Whether pre-routing filters attach at the | ||
| `Gateway` level, the listener level, via a new construct on `HTTPRoute`, via | ||
| policy attachment, or some combination, is deferred. See | ||
| [Options Under Consideration](#options-under-consideration). |
There was a problem hiding this comment.
This is fine for Provisional, but we will need to remove this almost immediately if we want to make the Experimental cutoff for v1.7 (which I think we should be aiming for!).
|
This LGTM for provisional with the one exception that it needs a filled out |
|
/ok-to-test |
Signed-off-by: Jackie Elliott <jaellio@microsoft.com>
@youngnick Updated! |
| featureNames: | ||
| - PayloadProcessor |
There was a problem hiding this comment.
Recommend a different feature name for this such as PreRoutingFilters.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jaellio, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
nirrozenbaum
left a comment
There was a problem hiding this comment.
joining the party late (was on a holiday vacation).
/lgtm
left one comment which I think should be a guiding principle (prefer reuse over new primitives when possible).
| answer to the pre-routing portion of [#5194](https://github.com/kubernetes-sigs/gateway-api/issues/5194). | ||
| * Enumerate the API-shape and semantic decisions that must be resolved at the | ||
| Experimental stage, without committing to any of them here. | ||
|
|
There was a problem hiding this comment.
I would also add as a goal - prefer reusing/extending the existing filters over creating new filters., e.g., it would make sense to me to extend RequestHeaderModifier and allow it to set a header based on a value from the body, rather than inventing a new filter for this option.
What type of PR is this?
/kind gep
What this PR does / why we need it:
Defines the provision GEP for pre-routing
Which issue(s) this PR fixes:
Fixes #5224
Does this PR introduce a user-facing change?:
Was AI used in preparing this PR?
AI was used to help write this GEP but the GEP was reviewed and edited by me.