mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-29 06:06:03 +00:00
set config.BindAddress to IPv4 address "127.0.0.1" if not specified
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
discovery "k8s.io/api/discovery/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
@@ -279,11 +279,6 @@ func NewProxier(ipt utiliptables.Interface,
|
||||
masqueradeValue := 1 << uint(masqueradeBit)
|
||||
masqueradeMark := fmt.Sprintf("%#08x/%#08x", masqueradeValue, masqueradeValue)
|
||||
|
||||
if nodeIP == nil {
|
||||
klog.Warning("invalid nodeIP, initializing kube-proxy with 127.0.0.1 as nodeIP")
|
||||
nodeIP = net.ParseIP("127.0.0.1")
|
||||
}
|
||||
|
||||
if len(clusterCIDR) == 0 {
|
||||
klog.Warning("clusterCIDR not specified, unable to distinguish between internal and external traffic")
|
||||
} else if utilnet.IsIPv6CIDRString(clusterCIDR) != ipt.IsIpv6() {
|
||||
|
Reference in New Issue
Block a user