-
Notifications
You must be signed in to change notification settings - Fork 507
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
api: add RouteReasonNotAllowedByListeners #1155
api: add RouteReasonNotAllowedByListeners #1155
Conversation
Add a RouteConditionReason constant, "NotAllowedByListeners", for use when a route fails to match any of the allowedRoutes conditions on a Gateway's Listeners.
Add a RouteConditionReason constant, "NoMatchingListenerHostname", for when a Gateway has no compatible Listeners with a Hostname that matches one of the route hostnames.
Hi @rainest. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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/test-infra repository. |
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 @rainest!
/ok-to-test
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rainest, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I had a brief discussion with @mikemorris re separating NotAllowedByListeners into separate constants for AllowedRoutes Kind and Namespace sections to be more specific and allow more targeted conformance tests, but I don't think we can do this since we're checking a route against all available Listeners, and can encounter scenarios like:
where the answer to "was the route denied because of AllowedRoutes.Kinds or because of AllowedRoutes.Namespaces?" is "Both?". Therefore, conformance tests should probably test that each of "only rejected because of Kind criteria", "only rejected because of (each type of) Namespace criteria", and mixed cases like the above result in the same NotAllowedByListeners. Intuitively, I'd expect that Hostname checks, and receiving status NoMatchingListenerHostname, are performed after AllowedRoutes checks, and that routes should not expect to see NoMatchingListenerHostname if they also qualify for NotAllowedByListeners. However, I don't think this actually matters in practice, so conformance tests should not test behavior when a route is neither allowed by AllowedRoutes nor matches any Hostnames. Conformance tests for NotAllowedByListeners should probably omit Hostnames and tests for NoMatchingListenerHostname should probably omit AllowedRoutes (or rather, provide Listeners with compatible protocols and the implied AllowedRoutes.Kinds) from test Listeners as such. |
Co-authored-by: Rob Scott <rob.scott87@gmail.com>
/lgtm |
What type of PR is this?
/kind feature
Optionally add one or more of the following kinds if applicable:
/kind api-change
What this PR does / why we need it:
Adds two
RouteConditionReason
constants forRouteConditionAccepted==false
:NotAllowedByListeners
indicates that none of the Gateway's Listeners have anallowedRoutes
that permits the route.NoMatchingListenerHostname
indicates that none of the Gateway's compatible Listeners have a Hostname that matches one of the route's hostnames (and implicitly that there is no compatible Listener without a Hostname, which would match any route).Which issue(s) this PR fixes:
Related to #1077
Does this PR introduce a user-facing change?: