Skip to content

Conversation

@davidjumani
Copy link

@davidjumani davidjumani commented Oct 28, 2025

What type of PR is this?
Add one of the following kinds:
/kind documentation
/kind gep

Optionally add one or more of the following kinds if applicable:
/area conformance-test

What this PR does / why we need it:
This PR does the following :

  • Adds the list of conformance tests to be added to ListenerSets (GEP-1713)
  • Updates the status of the Gateway to include AttachedListeners that is the count of successful ListenerSet attachments to the gateway. Ref: slack theraad

The aim is to get consensus for the set of conformance tests required to validate this feature against implementations, and move towards promoting this to Standard

Does this PR introduce a user-facing change?:

Adds the `AttachedListeners` conditions to the Gateway status for the GEP and details for ListenerSets conformance tests

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/documentation Categorizes issue or PR as related to documentation. kind/gep PRs related to Gateway Enhancement Proposal(GEP) area/conformance-test Issues or PRs related to Conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 28, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 28, 2025
@davidjumani
Copy link
Author

cc @rikatz @dprotaso

@robscott
Copy link
Member

cc @rostislavbobo @mkosieradzki

@rikatz
Copy link
Member

rikatz commented Oct 28, 2025

@davidjumani thanks, this is a great write of conformance. Do you think it makes sense to also add the expected conditions on each conformance item, and also the ancestorStatus expected, to make it clear to implementations what we will look for?

@davidjumani
Copy link
Author

davidjumani commented Oct 28, 2025

Do you think it makes sense to also add the expected conditions on each conformance item

I intentionally left them out right now in case there's any discussion to be had when the conformance tests are in review. Happy to add them now if that would clarify things and make reviewing the tests easier.

Added the expected status as well as added the AttachedListeners status that is the count of successful ListenerSet attachments to the gateway. Ref: slack theraad

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2025
@davidjumani davidjumani changed the title Add conformance details to ListenerSets (GEP-1713) Revise GEP-1713: Add status update and conformance test details for ListenerSets Oct 29, 2025
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Oct 29, 2025
@davidjumani davidjumani changed the title Revise GEP-1713: Add status update and conformance test details for ListenerSets Revise GEP-1713: Update gateway status and conformance test details for ListenerSets Oct 29, 2025
- The ListenerSet has the following status :
| Type | Status | Reason |
| -------- | ------- | ------- |
| Accepted | True | ListenersNotValid |
Copy link
Member

Choose a reason for hiding this comment

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

should this accepted here be false?

Copy link
Author

Choose a reason for hiding this comment

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

Based on the GEP

	// This can be the reason when "Accepted" is "True" or "False", depending on whether
	// the listener being invalid causes the entire Gateway to not be accepted.

I believe this should be true since the ListenerSet is configured but does not adversely affect the parent Gateway.
Additionally, there can be a scenario where only a subset of the listeners is invalid and this would more accurately reflect it

Copy link
Member

Choose a reason for hiding this comment

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

but then the reason should be empty or something else, right? It was accepted but not programmed, I guess

Copy link
Member

Choose a reason for hiding this comment

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

+1. If the status is Accepted, there should not be a reason for that.

I wouldn't also mix Accepted: True and Programmed: False in this case. The Programmed condition indicates whether the controller was physically able to apply the requested resources (e.g. allocate an IP or open a port). Listener conflicts are configuration errors, not the controller ability to program them.

Copy link
Author

Choose a reason for hiding this comment

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

I don't think so. A subset of listeners can be accepted, so the status should reflect it accordingly.
If not all listeners are accepted, then the listenerSet Accepted condition should be false.

Additionally, the Programmed condition should also reflect the same, since a subset of listeners was applied

- The parent gateway has the following status :
| Type | Status | Reason |
| -------- | ------- | ------- |
| AttachedListenerSets | False | ListenerSetsNotAllowed |
Copy link
Member

Choose a reason for hiding this comment

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

do we really need this condition on the parent gateway? I am wondering if in Gateway case we can just not have any count of attached listener, as mostly the user will have its own condition

Copy link
Author

Choose a reason for hiding this comment

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

I think the condition should be set since :

  • The user has explicitly disallowed ListenerSets
  • ListenerSets have been attached (at least tried) to the Gateway

The user should know about this in the status

Copy link
Member

Choose a reason for hiding this comment

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

I am not aware of the whole conditions reasoning here tbh, will defer to @youngnick for some better view on it

- The newer ListenerSet has the following status :
| Type | Status | Reason |
| -------- | ------- | ------- |
| Accepted | True | ListenersNotValid |
Copy link
Member

Choose a reason for hiding this comment

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

again, should we have an accepted here? And a reason? Not sure if this doesn't get more confusing

Copy link
Author

Choose a reason for hiding this comment

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

I think this is a better indication that the listenerSet is correct (the parentref is valid, etc.) but one or more of the listeners is invalid which is indicated by the ListnerStatus above

Copy link
Member

@rostislavbobo rostislavbobo Nov 11, 2025

Choose a reason for hiding this comment

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

but one or more of the listeners is invalid which is indicated by the ListnerStatus above

If all listeners in the ListenerSet have conflicts, shouldn't we report the ListenerSet as not accepted? This is consistent with other resources (e.g. if an HTTPRoute has no hostname intersection with a Gateway listener, it's reported a not accepted).

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I agree and will update it accordingly. I'll make this clearer with the total number of conflicting listeners

@rikatz
Copy link
Member

rikatz commented Oct 30, 2025

@davidjumani overall lgtm! I would like us to keep separated a PR that changes the GEP from a PR that changes the API, this way if we need to track any (or revert) we have proper changes

Thanks again for the effort here!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: davidjumani
Once this PR has been reviewed and has the lgtm label, please assign aojea for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@davidjumani
Copy link
Author

davidjumani commented Oct 30, 2025

Thanks for the review @rikatz I've answered the open questions and reverted the API changes.
Raised api: Update gateway status to include AttachedListeners with the changes

Copy link
Member

@rostislavbobo rostislavbobo left a comment

Choose a reason for hiding this comment

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

Thanks @davidjumani for a great conformance writeup! Left a couple of comment, let's discuss them today.

They will validate the following scenarios :
1. AllowedListeners is not specified on the parent Gateway
- `Gateway.spec.allowedListeners` is not specified (defaults to None)
Copy link
Member

Choose a reason for hiding this comment

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

I am missing here and in the scenarios below whether the Gateway itself has listeners defined. This could change the statuses below and the outcome, for example, if Gateway listeners and ListenerSet listeners share the same port.

Can we be explicit and state that the Gateways have no listeners defined?

Copy link
Author

@davidjumani davidjumani Nov 18, 2025

Choose a reason for hiding this comment

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

Currently, the Gateway validation requires at least one listener to be defined. I based the tests on this restriction

// +kubebuilder:validation:MinItems=1


- https://docs.google.com/document/d/1qj7Xog2t2fWRuzOeTsWkabUaVeOF7_2t_7appe8EXwA/edit

## Conformance Details
Copy link
Member

Choose a reason for hiding this comment

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

Should we clarify that the status is reported per parentRef? A ListenerSet can have different acceptance statuses depending on the Gateway configs it is attached to.

Copy link
Author

Choose a reason for hiding this comment

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

A listenerSet can have only one parent as per

ParentRef ParentGatewayReference `json:"parentRef"`

Copy link
Contributor

@mikemorris mikemorris Nov 18, 2025

Choose a reason for hiding this comment

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

Hmmm, I can't recall if there was any substantial discussion around this previously, but it could be possible to add a pluralized version of this field in some future revision if use cases demanded it. I'd kinda rather get the status nesting per-parentRef now (even if it feels redundant/unnecessary, it would mirror similar patterns on many other GWAPI resources) rather than deal with trying to add nesting to an assumed-singular hierarchy later...

- The ListenerSet has the following status :
| Type | Status | Reason |
| -------- | ------- | ------- |
| Accepted | True | ListenersNotValid |
Copy link
Member

Choose a reason for hiding this comment

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

+1. If the status is Accepted, there should not be a reason for that.

I wouldn't also mix Accepted: True and Programmed: False in this case. The Programmed condition indicates whether the controller was physically able to apply the requested resources (e.g. allocate an IP or open a port). Listener conflicts are configuration errors, not the controller ability to program them.

- The newer ListenerSet has the following status :
| Type | Status | Reason |
| -------- | ------- | ------- |
| Accepted | True | ListenersNotValid |
Copy link
Member

@rostislavbobo rostislavbobo Nov 11, 2025

Choose a reason for hiding this comment

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

but one or more of the listeners is invalid which is indicated by the ListnerStatus above

If all listeners in the ListenerSet have conflicts, shouldn't we report the ListenerSet as not accepted? This is consistent with other resources (e.g. if an HTTPRoute has no hostname intersection with a Gateway listener, it's reported a not accepted).

Comment on lines +1026 to +1027
| AttachedListenerSets | // depends on whether there are any other valid listeners in the attached ListenerSets // | ListenerSetsAttached |
| AttachedListeners | // total number of child listenerSets // | |
Copy link
Member

Choose a reason for hiding this comment

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

Let's be clear on numbers and Gateway setup (also see comment). We spend a decent amount of time pondering various options that result in different calculations and statuses, so it'd be grate if we could disambiguate.

Copy link
Author

@davidjumani davidjumani Nov 18, 2025

Choose a reason for hiding this comment

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

I would prefer that we iron this out in the conformance tests. These serve more as guidelines, as we can always add more tests and update this later. I would like to get something in that we can work towards rather than making a comprehensive test plan that only stays in review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/conformance-test Issues or PRs related to Conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/documentation Categorizes issue or PR as related to documentation. kind/gep PRs related to Gateway Enhancement Proposal(GEP) release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants