mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Fix kube-proxy dual-stack-iptables-binary-presence check
Kube-proxy was checking that iptables supports both IPv4 and IPv6 and falling back to single-stack if not. But it always fell back to the primary IP family, regardless of which family iptables supported... Fix it so that if the primary IP family isn't supported then it bails out entirely.
This commit is contained in:
parent
4e70155dbd
commit
fb84c4f0f0
@ -165,11 +165,11 @@ func newProxyServer(
|
||||
ipt[1] = iptInterface
|
||||
}
|
||||
|
||||
for _, perFamilyIpt := range ipt {
|
||||
if !perFamilyIpt.Present() {
|
||||
klog.InfoS("kube-proxy running in single-stack mode, this ipFamily is not supported", "ipFamily", perFamilyIpt.Protocol())
|
||||
dualStack = false
|
||||
}
|
||||
if !ipt[0].Present() {
|
||||
return nil, fmt.Errorf("iptables is not supported for primary IP family %q", primaryProtocol)
|
||||
} else if !ipt[1].Present() {
|
||||
klog.InfoS("kube-proxy running in single-stack mode: secondary ipFamily is not supported", "ipFamily", ipt[1].Protocol())
|
||||
dualStack = false
|
||||
}
|
||||
|
||||
if proxyMode == proxyconfigapi.ProxyModeIPTables {
|
||||
|
Loading…
Reference in New Issue
Block a user