mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Don't explicitly filter config.NodePortAddresses by IP family
There's no need to do this any more: proxyutil.NodePortAddresses does it itself.
This commit is contained in:
parent
a74b9fde3a
commit
ebb0fdd4f6
@ -111,8 +111,6 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
ipt[1] = iptInterface
|
ipt[1] = iptInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
nodePortAddresses := config.NodePortAddresses
|
|
||||||
|
|
||||||
if !ipt[0].Present() {
|
if !ipt[0].Present() {
|
||||||
return nil, fmt.Errorf("iptables is not supported for primary IP family %q", primaryProtocol)
|
return nil, fmt.Errorf("iptables is not supported for primary IP family %q", primaryProtocol)
|
||||||
} else if !ipt[1].Present() {
|
} else if !ipt[1].Present() {
|
||||||
@ -125,7 +123,6 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
badAddrs := npaByFamily[secondaryFamily]
|
badAddrs := npaByFamily[secondaryFamily]
|
||||||
if len(badAddrs) > 0 {
|
if len(badAddrs) > 0 {
|
||||||
klog.InfoS("Ignoring --nodeport-addresses of the wrong family", "ipFamily", secondaryFamily, "addresses", badAddrs)
|
klog.InfoS("Ignoring --nodeport-addresses of the wrong family", "ipFamily", secondaryFamily, "addresses", badAddrs)
|
||||||
nodePortAddresses = npaByFamily[s.PrimaryIPFamily]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +154,7 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
s.NodeIPs,
|
s.NodeIPs,
|
||||||
s.Recorder,
|
s.Recorder,
|
||||||
s.HealthzServer,
|
s.HealthzServer,
|
||||||
nodePortAddresses,
|
config.NodePortAddresses,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// Create a single-stack proxier if and only if the node does not support dual-stack (i.e, no iptables support).
|
// Create a single-stack proxier if and only if the node does not support dual-stack (i.e, no iptables support).
|
||||||
@ -183,7 +180,7 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
s.NodeIPs[s.PrimaryIPFamily],
|
s.NodeIPs[s.PrimaryIPFamily],
|
||||||
s.Recorder,
|
s.Recorder,
|
||||||
s.HealthzServer,
|
s.HealthzServer,
|
||||||
nodePortAddresses,
|
config.NodePortAddresses,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +227,7 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
s.Recorder,
|
s.Recorder,
|
||||||
s.HealthzServer,
|
s.HealthzServer,
|
||||||
config.IPVS.Scheduler,
|
config.IPVS.Scheduler,
|
||||||
nodePortAddresses,
|
config.NodePortAddresses,
|
||||||
kernelHandler,
|
kernelHandler,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@ -262,7 +259,7 @@ func (s *ProxyServer) createProxier(config *proxyconfigapi.KubeProxyConfiguratio
|
|||||||
s.Recorder,
|
s.Recorder,
|
||||||
s.HealthzServer,
|
s.HealthzServer,
|
||||||
config.IPVS.Scheduler,
|
config.IPVS.Scheduler,
|
||||||
nodePortAddresses,
|
config.NodePortAddresses,
|
||||||
kernelHandler,
|
kernelHandler,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user