mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Merge pull request #66064 from honkiko/fix-nodeport-local
Automatic merge from submit-queue (batch tested with PRs 66064, 66040). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix Local externalTrafficPolicy is not respected for ipvs NodePort **What this PR does / why we need it**: Local externalTrafficPolicy is not respected for ipvs NodePort. This PR fixes it. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #66062 **Special notes for your reviewer**: Manually tested accessing NodePort with externalTrafficPolicy=Local and externalTrafficPolicy=Cluster. **Release note**: ```release-note ```
This commit is contained in:
@@ -1116,7 +1116,7 @@ func (proxier *Proxier) syncProxyRules() {
|
||||
// There is no need to bind Node IP to dummy interface, so set parameter `bindAddr` to `false`.
|
||||
if err := proxier.syncService(svcNameString, serv, false); err == nil {
|
||||
activeIPVSServices[serv.String()] = true
|
||||
if err := proxier.syncEndpoint(svcName, false, serv); err != nil {
|
||||
if err := proxier.syncEndpoint(svcName, svcInfo.OnlyNodeLocalEndpoints, serv); err != nil {
|
||||
glog.Errorf("Failed to sync endpoint for service: %v, err: %v", serv, err)
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user