mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"
This commit is contained in:
@@ -199,18 +199,6 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) {
|
||||
Thresholds: thresholds,
|
||||
}
|
||||
|
||||
if s.MakeIPTablesUtilChains {
|
||||
if s.IPTablesMasqueradeBit > 31 || s.IPTablesMasqueradeBit < 0 {
|
||||
return nil, fmt.Errorf("iptables-masquerade-bit is not valid. Must be within [0, 31]")
|
||||
}
|
||||
if s.IPTablesDropBit > 31 || s.IPTablesDropBit < 0 {
|
||||
return nil, fmt.Errorf("iptables-drop-bit is not valid. Must be within [0, 31]")
|
||||
}
|
||||
if s.IPTablesDropBit == s.IPTablesMasqueradeBit {
|
||||
return nil, fmt.Errorf("iptables-masquerade-bit and iptables-drop-bit must be different")
|
||||
}
|
||||
}
|
||||
|
||||
return &KubeletConfig{
|
||||
Address: net.ParseIP(s.Address),
|
||||
AllowPrivileged: s.AllowPrivileged,
|
||||
@@ -293,13 +281,10 @@ func UnsecuredKubeletConfig(s *options.KubeletServer) (*KubeletConfig, error) {
|
||||
HairpinMode: s.HairpinMode,
|
||||
BabysitDaemons: s.BabysitDaemons,
|
||||
ExperimentalFlannelOverlay: s.ExperimentalFlannelOverlay,
|
||||
NodeIP: net.ParseIP(s.NodeIP),
|
||||
EvictionConfig: evictionConfig,
|
||||
PodsPerCore: int(s.PodsPerCore),
|
||||
ProtectKernelDefaults: s.ProtectKernelDefaults,
|
||||
MakeIPTablesUtilChains: s.MakeIPTablesUtilChains,
|
||||
iptablesMasqueradeBit: int(s.IPTablesMasqueradeBit),
|
||||
iptablesDropBit: int(s.IPTablesDropBit),
|
||||
NodeIP: net.ParseIP(s.NodeIP),
|
||||
EvictionConfig: evictionConfig,
|
||||
PodsPerCore: int(s.PodsPerCore),
|
||||
ProtectKernelDefaults: s.ProtectKernelDefaults,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -908,10 +893,8 @@ type KubeletConfig struct {
|
||||
HairpinMode string
|
||||
BabysitDaemons bool
|
||||
Options []kubelet.Option
|
||||
ProtectKernelDefaults bool
|
||||
MakeIPTablesUtilChains bool
|
||||
iptablesMasqueradeBit int
|
||||
iptablesDropBit int
|
||||
|
||||
ProtectKernelDefaults bool
|
||||
}
|
||||
|
||||
func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.PodConfig, err error) {
|
||||
@@ -1009,9 +992,6 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod
|
||||
kc.EvictionConfig,
|
||||
kc.Options,
|
||||
kc.EnableControllerAttachDetach,
|
||||
kc.MakeIPTablesUtilChains,
|
||||
kc.iptablesMasqueradeBit,
|
||||
kc.iptablesDropBit,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user