generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 464
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
GEP: introduce GEP 820 #822
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# GEP-820: Drop extension points from Route matches | ||
|
||
* Issue: [#820](https://github.com/kubernetes-sigs/gateway-api/issues/820) | ||
* Status: Implementable | ||
|
||
## TLDR | ||
|
||
Drop extension points within Route match block. These extension points are | ||
not well understood. | ||
|
||
## Goals | ||
|
||
- Drop the extension points within Route match block. | ||
|
||
## Non-Goals | ||
|
||
- Figure out a replacement solution for the use-case that these extension | ||
points addressed | ||
|
||
## Introduction | ||
|
||
As the API moves towards `v1alpha2`, the maintainers intend to make the API | ||
stable and forward compatible for the foreseeable future. To that end, | ||
maintainers intend to minimize (eliminate if possible) breaking changes post | ||
`v1alpha2`. This GEP is part of that initiative. | ||
|
||
Extension points for match criteria in Routes were added to enable use-cases | ||
where match criteria defined by implementation was a super-set of match | ||
criteria defined within this API. To the best of our knowledge, even though | ||
extension points were added, no concrete examples or use-cases were known at | ||
that time and none have been discovered so far. | ||
|
||
This proposal advocates removal of these extension points because: | ||
|
||
- It goes against the unwritten design principles this API has followed so far: | ||
|
||
- minimize number of API types as much as possible | ||
- minimize strongly coupled API types and instead shoot for self-contained | ||
types. | ||
- extension points are introduced with clear use-cases and possibilities in | ||
mind. Vague extension points are avoided as they become harder to maintain. | ||
- It is unlikely that the user experience resulting from defining two k8s | ||
resources for defining a Route will be optimal. | ||
- There is not prior art on splitting match criteria and backend forwarding | ||
semantics (spec.backends) in the community. We believe they are kept together | ||
for good reasons. | ||
|
||
## API | ||
|
||
The following fields and all associated documentation will be removed: | ||
|
||
- HTTPRouteMatch.ExtensionRef | ||
- TCPRouteMatch.ExtensionRef will be removed. This results in a struct without | ||
any members: TCPRouteMatch. The struct will be kept as it is expected that | ||
more match criterias might be added to L4 routes. | ||
|
||
- Do the same to UDPRoute and TLSRoute | ||
|
||
## Alternatives | ||
|
||
N/A | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should still give a patch to support more match types -- as they are going to come up.
What about this:
Modify
HTTPPathMatch.Type
:acme.io/my-custom-match
). These represent custom match typesExact
,Prefix
,RegularExpression
) stayImplementationSpecific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robscott
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few related conversations going on here, but it's helpful to reference Dan's earlier comment in the sig-net review that showed the limitations of a single ImplementationSpecific match type: #780 (comment).
Although not completely in scope for the original purpose of this GEP, I think there's enough overlap to discuss it here. I think @bowei's suggestion to bundle this removal of the
ExtensionRef
with the ability to provide custom match types would help here. Although we'd be removing one way to extend path matching, we'd be adding other more targeted/clearly scoped extension points. It would also match the pattern we've already chosen to take with Protocol on Gateway listeners (a core set of supported values with clear meaning + a way to use your own custom types when necessary).What do you think @hbagdi @jpeach @youngnick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is something we want to move forward with, should we take the same approach for header and query param matching that also include ImplementationSpecific match types? I don't think we had a clear purpose for the match types in those cases other than to be consistent with path match types, where we were really trying to be consistent with Ingress...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to just remove it in this iteration. Specifying a match as a separate object is awkward and verbose, and I haven't heard anyone that plans to implement this.
I also don't think that "ImplementationSpecific" is workable in general, because it doesn't actually let you say what kind of match the implementation wants to make.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're all in agreement on removing it. I hate to scope creep, but it does seem like it could make sense to combine the removal of this extension mechanism with loosened validation on match types as an alternative extension point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpeach To clarify, were you referring to "extensionRef" or "ImplementationSpecific" match types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The former, per the proposal in this GEP. I was just saying that I don't really think we should also try to replace it in this GEP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the idea of adding qualified path match types is fine, but I don't think that we should push to get it into v1alpha2. It's additive anyway.
I'd support just dumping
ImplementationSpecific
for now, and ensuring that the thing we're designing actually does what we want.