Skip to content
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

GEP-1713: ListenerSets - Standard Mechanism to Merge Gateway Listeners (rev 2) #3213

Merged
merged 45 commits into from
Jan 31, 2025

Conversation

dprotaso
Copy link
Contributor

@dprotaso dprotaso commented Jul 23, 2024

This replaces #1863
What type of PR is this?

/kind gep

What this PR does / why we need it:

Outlines a mechanism to merge Gateway Listeners

Which issue(s) this PR fixes:

Fixes #1713

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/gep PRs related to Gateway Enhancement Proposal(GEP) do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 23, 2024
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

Quite a few comments here, thanks for keeping working on pushing this forward.

geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this @dprotaso!

geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

This LGTM for Provisional (or maybe even Implementable, since we'll need to implement it and try it out) now.

@youngnick
Copy link
Contributor

Reading back over this, I think the main things outstanding are:

@robscott
Copy link
Member

I'm strongly in favor of this, and the idea seems to be gaining some traction on the corresponding issue.

  • Will we make port optional in the ListenerSet version of Listener?

I would like to ensure that this has a well documented path forward to supporting all ports on a single Listener. That could either be a port range or an empty port. We don't have to start with either of those, I'd just like to have a documented plan for how we could get there.

  • Will we keep the parentRef as a list or move it back to a singular one?

I'm on the fence on this one, left a comment above.

@mikemorris
Copy link
Contributor

I would like to ensure that this has a well documented path forward to supporting all ports on a single Listener.

Could make sense to align with NetPol conventions on this (omitting an optional port field implies all), refs kubernetes-sigs/network-policy-api#247 (comment)

@dprotaso
Copy link
Contributor Author

I was thinking an empty port could be allow the implementation to pick a random port. Though I realize now we could also accomplish that by relaxing our constraints on PortNumber and allowing 0 (unix semantics). If we do that then I don't particularly need an optional port - so I'm curious about other people's use cases.

I think use of port in netpol is fundamentally different than that of a listener - eg. firewall rules semantics (no port == all) vs listener semantics (0 port = wildcard)

geps/gep-1713/index.md Outdated Show resolved Hide resolved
geps/gep-1713/index.md Show resolved Hide resolved
}
// ListenerEntry embodies the concept of a logical endpoint where a Gateway accepts
// network connections.
type ListenerEntry struct {
Copy link
Member

Choose a reason for hiding this comment

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

I think that including L4 considerations at the very first stage of the design, before having the actual API in place is too much of a stretch. Getting rid of L4 routes in favor of including L4 routing information (i.e., backends) is a controversial one (for which I am on the fence honestly) and I don't think that should block this GEP which has been in the work for a long time and needs to be moved forward.

Putting here L4 will likely require a lot of discussion, partially off-topic with the broader goal of this GEP.

geps/gep-1713/index.md Show resolved Hide resolved
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

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

Once others' comments are addressed, I'm ok with moving this one forward. Thanks, @dprotaso!

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2025
@dprotaso
Copy link
Contributor Author

dprotaso commented Jan 31, 2025

So an observation I have regarding multiple parentRefs would make certain future changes/features incompatible.

For example we're talking about making port optional here and I was suggesting we could allow implementations to choose a port here but then this wouldn't be possible with multiple parentRefs since different implementations would most likely choose a different port.

Also reasoning about policy might be simpler because we can say this ListenerSet has this inherited policy from the Gateway. With multiple parentRefs that's not really possible and it limits the ListenerSet to simply add these extra listeners to these gateways.

@dprotaso
Copy link
Contributor Author

dprotaso commented Jan 31, 2025

/hold

given that parentRefs was added as a way to 'future proof' (#3213 (comment), (#3213 (comment))) rather than being born from a real use case - I'm included to switch this to a single parentRef

@robscott
Copy link
Member

Thanks @dprotaso! This looks good to move forward to the next phase of the v1.3 cycle.

Of course we'll still need to do some refinement in the next phase, and should probably have some more discussion around the most recent changes (single ParentRef, optional port), so let's start that discussion very early to ensure we can get a final API merged in.

/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 31, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, mlavacca, robscott

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

The pull request process is described 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

@dprotaso
Copy link
Contributor Author

let me make the single parentRef changes to the GEP before merge
/hold

@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 Jan 31, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2025
@dprotaso
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 31, 2025
@robscott
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7ca7d50 into kubernetes-sigs:main Jan 31, 2025
12 of 13 checks passed
@dprotaso dprotaso deleted the gep-1713-rev-2 branch February 1, 2025 01:23
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. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. 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.

GEP: Standard Mechanism to Merge Multiple Gateways
10 participants