-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update gatewayapi to v1.0.0 #286
Merged
adam-cattermole
merged 7 commits into
Kuadrant:main
from
adam-cattermole:gateway-api-v1.0.0
Nov 14, 2023
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c2140f8
Update gateway-api go pkg to v1.0.0
adam-cattermole c52a302
Update example to gateway-api/v1
adam-cattermole dd3b01a
Update config to gateway-api/v1
adam-cattermole aa2902f
Update docs to gateway-api/v1
adam-cattermole c72057c
Restrict sizes of types for kube apiserver cost analysis
adam-cattermole 7ec03c3
Update bundle to gatewayapi/v1
adam-cattermole 05fe71a
Bump go version to 1.21
adam-cattermole 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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
See kubernetes-sigs/gateway-api#995 (comment)
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.
We are going with the hard limits for now. We hope soon to be able to remove or substantially increase these limits of maximum number of configs per AP/RLP, by redefining those GWAPI types (HTTPRouteMatch and related) into our code base without the CEL validation rules. After all, Kuadrant API does not need to re-impose validation on those fields if they have been validated once applied in the target GWAPI resources.
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.
Sorry, can you briefly explain what is this about? I read from the link
What do you mean by
the estimated cost limit exceeds the thresholds
? The client upon creating an object is giving timeouts because k8s API server takes too long to validate the resource?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.
ping @guicassolato
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 can try to provide some info here @eguzki.
When you submit a CRD to the kube apiserver it makes an estimate of how costly the CEL validation rules are, so that when a CR of this type is submitted to the cluster it can evaluate it. There is a cost limit for this validation, and so if the estimated cost exceeds the limit the CRD is rejected, as the kube apiserver determines it would be too costly for it to perform validations on CR's that are created of this type.
To avoid this case it rejects the CRD early based on the estimation.
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.
Thanks for the explanation.
And those numbers
MaxProperties=14
are magic numbers or they have a reasoning behind them? What are those number depending on?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.
Matches
was set to be size 8 to mirror the use in GWAPIMatches
- https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1/httproute_types.go#L192-L194RouteSelectors
were then set as N-1 of the use in GWAPIRules
- https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1/httproute_types.go#L119-L121RouteSelectors
is the maximum size we can set them to before we exceed the cost limit without reducing the other two limits.