Skip to content
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

feat(gateway-api): matching routes by Listener.AllowedRoutes #3181

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

pmalek
Copy link
Member

@pmalek pmalek commented Nov 21, 2022

What this PR does / why we need it:

This PR implements matching listeners by Listener.AllowedRoutes as well as some refactor in getSupportedGatewayForRoute

Which issue this PR fixes:

Should fix #2408

Special notes for your reviewer:

This PR also adds matching routes against listener's status and most specifically .SupportedKinds. I'm not sure if that's the right thing to do given the comment in the spec but it surely feels right. For now in such cases we'd add a gatewayv1beta1.RouteReasonNotAllowedByListeners.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@pmalek pmalek added the area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API label Nov 21, 2022
@pmalek pmalek added this to the KIC v2.8.0 milestone Nov 21, 2022
@pmalek pmalek self-assigned this Nov 21, 2022
@pmalek pmalek changed the title feat(gateway-api): matching routes by Listener.AllowedRoutes feat(gateway-api): matching routes by Listener.AllowedRoutes Nov 21, 2022
@pmalek pmalek force-pushed the route-matching-checks-supported-kinds branch from 50461f0 to 6078573 Compare November 21, 2022 14:57
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 15:38 Inactive
@pmalek pmalek force-pushed the route-matching-checks-supported-kinds branch from 6078573 to 3330303 Compare November 21, 2022 17:08
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 17:08 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 17:33 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 17:33 Inactive
@pmalek pmalek force-pushed the route-matching-checks-supported-kinds branch from 3330303 to f66db93 Compare November 21, 2022 18:54
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 18:55 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 19:20 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 19:20 Inactive
@pmalek pmalek marked this pull request as ready for review November 21, 2022 20:15
@pmalek pmalek requested a review from a team as a code owner November 21, 2022 20:15
@pmalek pmalek force-pushed the route-matching-checks-supported-kinds branch from f66db93 to 281300e Compare November 21, 2022 20:16
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 20:16 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 20:40 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 21, 2022 20:41 Inactive
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matching host step always returns false for TCPRoute and UDPRoute. I do not know if this is expected.

internal/controllers/gateway/route_utils.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Outdated Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Show resolved Hide resolved
internal/controllers/gateway/route_utils.go Show resolved Hide resolved
@pmalek pmalek temporarily deployed to Configure ci November 22, 2022 10:15 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 22, 2022 10:40 Inactive
@pmalek pmalek temporarily deployed to Configure ci November 22, 2022 10:40 Inactive
@pmalek pmalek added the do not merge let the author merge this, don't merge for them. label Nov 22, 2022
@pmalek
Copy link
Member Author

pmalek commented Nov 22, 2022

Adding do not merge label as I'm not sure about the supported kinds from listeners status ad whether those should be taken into account

@pmalek
Copy link
Member Author

pmalek commented Nov 24, 2022

@pmalek pmalek removed the do not merge let the author merge this, don't merge for them. label Nov 24, 2022
@pmalek pmalek merged commit 525b2f4 into main Nov 24, 2022
@pmalek pmalek deleted the route-matching-checks-supported-kinds branch November 24, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement AllowedRoutes kinds filters
2 participants