Repository navigation
conformance: add cross-namespace ListenerSet AllowedRoutes test - #4841
k8s-ci-robot merged 1 commit into
Conversation
|
Welcome @asauber! |
|
Hi @asauber. 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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test @asauber did you manage to run the test against any Gateway API implementation? |
snorwin
left a comment
There was a problem hiding this comment.
@asauber thanks for the PR, nice work.
I can confirm that Airlock Microgateway is successfully passing the proposed conformance tests.
However I would prefer to integrate the new test cases into ListenerSetAllowedRoutesNamespaces and reusing the existing gateway-with-listener-sets-test-allowed-routes Gateway, as each additional Gateway adds resource overhead and setup time, so keeping the suite lean here would be a nice win.
a77d834 to
8f676b2
Compare
Yes, but only against an early (not pushed) prototype of ListenerSet in Cilium. This test caught this bug in that implementation.
Pushed that updated here Thank you for the reviews! |
8f676b2 to
62b830b
Compare
Verify that AllowedRoutes.Namespaces.From: Same on a ListenerSet listener is evaluated relative to the ListenerSet's namespace, not the parent Gateway's namespace. The existing ListenerSetAllowedRoutesNamespaces test places both resources in the same namespace, making it possible for an implementation to incorrectly attribute the value of 'Same' in a ListenerSet spec to mean the GatewayAPI's namespace, and not the ListenerSet namespace. This test has been confirmed to catch this bug in a pre-release implementation of ListenerSet. Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
62b830b to
4ad50f5
Compare
|
@snorwin great feedback, thanks. I think I've addressed all of it. Also checked locally that the test compiles and passes with my local implementation. |
There was a problem hiding this comment.
@asauber nice work, thanks a lot.
/lgtm
Airlock Microgateway successfully passed all ListenerSetAllowedRoutesNamespaces tests:
=== RUN TestConformance/ListenerSetAllowedRoutesNamespaces
=== RUN TestConformance/ListenerSetAllowedRoutesNamespaces/Cross-namespace_ListenerSet
=== RUN TestConformance/ListenerSetAllowedRoutesNamespaces/Same-namespace_ListenerSet
...
--- PASS: TestConformance/ListenerSetAllowedRoutesNamespaces/Cross-namespace_ListenerSet (0.03s)
--- PASS: TestConformance/ListenerSetAllowedRoutesNamespaces/Same-namespace_ListenerSet (0.04s)
--- PASS: TestConformance/ListenerSetAllowedRoutesNamespaces (4.95s)
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asauber, rikatz, snorwin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind test
/area conformance-test
What this PR does / why we need it:
In GEP 1713 under the Conformance Details section, case number 13 makes it clear that
AllowedRoutes.Namespaces.Frombeing set toSameon aListenerSetmeans that only Routes from the ListenerSet's namespace should be accepted, and not routes from the Gateway's namespace.This PR adds a test which verifies that
AllowedRoutes.Namespaces.From: Sameon a ListenerSet listener is evaluated relative to the ListenerSet's namespace, not the parent Gateway's namespace.The existing ListenerSetAllowedRoutesNamespaces test places both resources in the same namespace, making it possible for an implementation to incorrectly attribute the value of 'Same' in a ListenerSet spec to mean the GatewayAPI's namespace, and not the ListenerSet namespace.
This test has been confirmed to catch this bug in a pre-release implementation of ListenerSet.
Does this PR introduce a user-facing change?: