-
Notifications
You must be signed in to change notification settings - Fork 635
tests: Add conformace tests for listenersets #3890
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
base: main
Are you sure you want to change the base?
tests: Add conformace tests for listenersets #3890
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: davidjumani The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test all |
|
/retest |
| // Requests to the listener with domain name conflict should not work | ||
| { | ||
| Request: http.Request{Host: "conflict.com", Path: "/gateway-route"}, | ||
| Response: http.Response{StatusCode: 404}, | ||
| }, |
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.
Hmm, I don't know if we were clear enough about this in the GEP, but in this case, because there is a Gateway Listener, it should win over the ListenerSet listener. (see https://gateway-api.sigs.k8s.io/geps/gep-1713/#listener-precedence for the details here)
In this and other conflict cases, there should always be one "winning" Listener from somewhere, and that Listener should end up Accepted, and traffic should flow.
The intent of that is to stop the creation of conflicts from stopping traffic flowing (that's why "oldest first wins" for ListenerSets).
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.
I'm confused since the GEP mentions
Implementations MUST treat the parent Gateways as having the merged list of all listeners from itself and attached ListenerSets and validation of this list of listeners MUST behave the same as if the list were part of a single Gateway with the relaxed listener name constraints.
and so I based the validation tests as though they were defined on a single gateway - My understanding was that the ordering was purely for merging them into a gateway and not validating them any different
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.
Okay I see #3978 has been updated. Shall I wait for it to merge before making the changes here ?
| hostname: "listenerset-1-listener-2.com" | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All |
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.
interesting: do we expect this to work, if the allowedListener defines just ListenerSet of the same namespace, or not?
I think the idea is to allow, just checking
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.
I'm a bit confused. Are you asking if the Listener on the ListenerSet will accept routes from all namespaces if the Gateway's allowedListener is set to only listenerSets from the same namespace?
If so, it should allow since the allowedListener restricts listenersets and should have no effect on the routes
|
I still have some questions, but overall lgtm and I would like to see these tests running with other implementations. I will try to trigger it tomorrow against Istio and kgateway to see how they behave (failing is fine, as this may not be implemented yet) I have mapped some missing tests, but not for this PR:
|
|
Thanks @rikatz I've updated the PR and description with the passing run on kgateway |
|
/retest |
This reverts commit 3ec5493.
Thanks @rikatz |
|
/remove-label release-blocker |
|
@rikatz: The label(s) DetailsIn response to this:
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-sigs/prow repository. |
|
New changes are detected. LGTM label has been removed. |
16f861a to
f9423b7
Compare
afe4530 to
f9423b7
Compare
|
I'll update these tests and the API to use AttachedListenerSets as a count once merged |
What type of PR is this?
/kind test
/area conformance-test
What this PR does / why we need it:
This PR contains an initial conformance test for listenersets. This aims to verify the following :
Run against kgateway
Which issue(s) this PR fixes:
Fixes #3785
Does this PR introduce a user-facing change?: