Skip to content

[Gateway API] Validate ListenerSet listeners#4629

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
zac-nixon:main
Mar 19, 2026
Merged

[Gateway API] Validate ListenerSet listeners#4629
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
zac-nixon:main

Conversation

@zac-nixon
Copy link
Copy Markdown
Collaborator

Description

Validate Listeners originating from the ListenerSets are valid. This follows the precendence ordering found here. What this PR does NOT do, 1/ adds the listener entries from a listenerset into the gateway, 2/ handles listener status updates.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the docs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 18, 2026
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2026
@zac-nixon zac-nixon force-pushed the main branch 2 times, most recently from 0b0b899 to 0cba293 Compare March 18, 2026 20:04
Comment thread pkg/gateway/routeutils/listener_set.go Outdated
irrelevantResourceHandshakeState handshakeState = "irrelevant"
)

type mockListenerSetLoader struct {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we wanna put mock to a test file?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment thread controllers/gateway/gateway_controller.go Outdated
Comment thread pkg/gateway/routeutils/loader.go
Comment thread pkg/gateway/routeutils/loader.go Outdated
}
}()

lsListeners, rejectedListenerSets, err := l.lsLoader.retrieveListenersFromListenerSets(ctx, gw)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How do you think spelling out "listenerSet" everywhere instead of ls. I feel ls a little ambiguous, It is easy to understand it as shorthand for listener.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

makes sense

Comment thread pkg/gateway/routeutils/loader.go
Comment thread pkg/gateway/routeutils/listener_utils.go Outdated
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wweiwei-li, zac-nixon

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [wweiwei-li,zac-nixon]

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

@shuqz
Copy link
Copy Markdown
Collaborator

shuqz commented Mar 19, 2026

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2026
@k8s-ci-robot k8s-ci-robot merged commit 5cfeef8 into kubernetes-sigs:main Mar 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants