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

[release-1.23] Allow ServiceLB to honor ExternalTrafficPolicy=Local #6909

Conversation

brandond
Copy link
Contributor

@brandond brandond commented Feb 7, 2023

Proposed Changes

Allow ServiceLB to honor ExternalTrafficPolicy. Previously, ServiceLB violated the LoadBalancer spec by not properly delivering traffic only to the node-local endpoints of the service when the ExternalTrafficPolicy was set to Local. It would instead advertise the addresses of all nodes eligible to run ServiceLB, and forwarded traffic to all cluster endpoints.

Ref: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/#:~:text=externaltrafficpolicy%20(string)

Types of Changes

bugfix; enhancement

Verification

Testing

Linked Issues

User-Facing Change

ServiceLB now honors the Service's ExternalTrafficPolicy. When set to Local, the LoadBalancer will only advertise addresses of Nodes with a Pod for the Service, and will not forward traffic to other cluster members.

Further Comments

@brandond brandond requested a review from a team as a code owner February 7, 2023 00:39
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 94d1a87)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 369b81b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 1c6fde9)
Copy link

@VestigeJ VestigeJ left a comment

Choose a reason for hiding this comment

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

LGTM

@dereknola
Copy link
Contributor

Rebase for the new fedora37 images

@brandond brandond merged commit f924827 into k3s-io:release-1.23 Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants