Skip to content

fix(gateway-api): fixes silent ignore of GRPCRoute in allowedRoutes#44826

Merged
mhofstetter merged 1 commit intocilium:mainfrom
eufriction:fix/gateway-api-grpcroute-allowed-routes
Mar 18, 2026
Merged

fix(gateway-api): fixes silent ignore of GRPCRoute in allowedRoutes#44826
mhofstetter merged 1 commit intocilium:mainfrom
eufriction:fix/gateway-api-grpcroute-allowed-routes

Conversation

@eufriction
Copy link
Copy Markdown
Contributor

The function getGatewayKindForObject maps a route object to its Gateway API kind string. It handled HTTPRoute, TLSRoute, UDPRoute, and TCPRoute but was missing a case for GRPCRoute, causing it to return "Unknown".

Traffic failed with no indication in the route status, which uses a separate code path (input.GetGVK()) and remained Accepted: True.

Fixes: #44824

Fixes GRPCRoute being silently excluded from Envoy config when a Gateway listener explicitly sets allowedRoutes.kinds.

@eufriction eufriction requested a review from a team as a code owner March 16, 2026 21:24
@eufriction eufriction requested a review from mhofstetter March 16, 2026 21:24
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 16, 2026
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Mar 16, 2026
@mhofstetter
Copy link
Copy Markdown
Member

/test

@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. release-note/bug This PR fixes an issue in a previous release of Cilium. area/servicemesh GH issues or PRs regarding servicemesh feature/k8s-gateway-api labels Mar 17, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 17, 2026
Copy link
Copy Markdown
Member

@mhofstetter mhofstetter left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @eufriction!

Please fix the unused import issue - otherwise LGTM.

operator/pkg/gateway-api/helpers_test.go:10:2: "k8s.io/api/core/v1" imported as corev1 and not used

…or listener

The function getGatewayKindForObject maps a route object to its
Gateway API kind string. It handled HTTPRoute, TLSRoute, UDPRoute,
and TCPRoute but was missing a case for GRPCRoute, causing it to
return \"Unknown\".

Traffic failed with no indication in the route status, which uses
a separate code path (input.GetGVK()) and remained Accepted: True.

Fixes cilium#44824

Signed-off-by: Martin Lindberg <203184076+eufriction@users.noreply.github.com>
@eufriction eufriction force-pushed the fix/gateway-api-grpcroute-allowed-routes branch from 8b43bc4 to fd56dc3 Compare March 17, 2026 12:59
@eufriction
Copy link
Copy Markdown
Contributor Author

Thanks for the contribution @eufriction!

Please fix the unused import issue - otherwise LGTM.

operator/pkg/gateway-api/helpers_test.go:10:2: "k8s.io/api/core/v1" imported as corev1 and not used

Should be fixed now! Thanks for the swift response.

@mhofstetter
Copy link
Copy Markdown
Member

/test

Copy link
Copy Markdown
Member

@mhofstetter mhofstetter left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

(it seems that ci-eks is currently broken due to infra issues. i will check back and re-run once this is fixed 🤞 )

@mhofstetter mhofstetter added the needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch label Mar 18, 2026
@mhofstetter mhofstetter added this pull request to the merge queue Mar 18, 2026
Merged via the queue into cilium:main with commit 42aae09 Mar 18, 2026
75 of 79 checks passed
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 18, 2026
@tklauser tklauser mentioned this pull request Mar 24, 2026
5 tasks
@tklauser tklauser added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Mar 24, 2026
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/servicemesh GH issues or PRs regarding servicemesh backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. feature/k8s-gateway-api kind/bug This is a bug in the Cilium logic. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gateway-api: GRPCRoute silently excluded from Envoy config when listener has explicit allowedRoutes.kinds

3 participants