Skip to content

Conversation

@SinghVikram97
Copy link
Contributor

What type of PR is this?
feature

Which issue does this PR fix:
#786

What does this PR do / Why do we need it:
Implements Gateway API allowedRoutes validation to control which Routes can attach to Gateway listeners.

  • Namespace validation (Same/All/Selector) for cross-namespace Route access control
  • Kind validation (HTTPRoute/GRPCRoute/TLSRoute) based on listener protocol compatibility

Testing done on this change:
Tested manually and added e2e tests

Will this PR introduce any new dependencies?:
No

Will this break upgrades or downgrades. Has updating a running cluster been tested?:
This change might break existing Routes. Routes violating allowedRoutes will be rejected and show Accepted: false status. Breaking scenarios include:

  • HTTPRoutes in different namespaces targeting Gateways with listeners having default Same namespace policy
  • TLSRoutes targeting HTTP/HTTPS listeners (protocol incompatibility)

Old version of controller ignores default validation

Does this PR introduce any user-facing change?:

Gateway API allowedRoutes namespace and kind validation is now enforced. Routes violating Gateway listener policies will be rejected with Accepted:false status.

By default, Routes are supported in same namespace and kind depends on protocol compatibility (HTTP → HTTPRoute, HTTPS → HTTPRoute+GRPCRoute, TLS → TLSRoute).

For more details, refer: https://gateway-api.sigs.k8s.io/reference/spec/#allowedroutes

Do all end-to-end tests successfully pass when running make e2e-test?:

Ran 132 of 132 Specs in 4823.666 seconds
SUCCESS! -- 132 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestIntegration (4823.67s)
PASS
ok      github.com/aws/aws-application-networking-k8s/test/suites/integration   4823.711s

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@SinghVikram97 SinghVikram97 requested a review from a user November 26, 2025 17:55
@ghost ghost enabled auto-merge December 2, 2025 22:39
@ghost ghost added this pull request to the merge queue Dec 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 3, 2025
@ghost ghost enabled auto-merge December 3, 2025 00:10
@ghost ghost added this pull request to the merge queue Dec 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 4, 2025
…on (#845)

* feat: implement Gateway API allowedRoutes namespace and kind validation

* fix tests

* fix unit tests

---------

Co-authored-by: VikramBedi <vbedi@amazon.com>
Co-authored-by: Ryan Lymburner <137918933+rlymbur@users.noreply.github.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 4, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 4, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 4, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 5, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 5, 2025
…on (#845)

* feat: implement Gateway API allowedRoutes namespace and kind validation

* fix tests

* fix unit tests

* add assertions to wait for gateway to be updated before each test

* use diff namespace for label selector test

---------

Co-authored-by: VikramBedi <vbedi@amazon.com>
Co-authored-by: Ryan Lymburner <137918933+rlymbur@users.noreply.github.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 5, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 5, 2025
…on (#845)

* feat: implement Gateway API allowedRoutes namespace and kind validation

* fix tests

* fix unit tests

* add assertions to wait for gateway to be updated before each test

* use diff namespace for label selector test

* Add namespace RBAC permissions for Gateway listener namespace selectors

---------

Co-authored-by: VikramBedi <vbedi@amazon.com>
Co-authored-by: Ryan Lymburner <137918933+rlymbur@users.noreply.github.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 5, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 5, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Dec 5, 2025
@SinghVikram97 SinghVikram97 added this pull request to the merge queue Dec 5, 2025
Merged via the queue into aws:main with commit 17d50cc Dec 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant