mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Remove deprecated flag --non-masquerade-cidr in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
parent
fb26256803
commit
21809043b5
@ -781,9 +781,6 @@ function construct-linux-kubelet-flags {
|
||||
flags+=" --resolv-conf=/run/systemd/resolve/resolv.conf"
|
||||
fi
|
||||
fi
|
||||
if [[ -n "${NON_MASQUERADE_CIDR:-}" ]]; then
|
||||
flags+=" --non-masquerade-cidr=${NON_MASQUERADE_CIDR}"
|
||||
fi
|
||||
flags+=" --volume-plugin-dir=${VOLUME_PLUGIN_DIR}"
|
||||
local node_labels
|
||||
node_labels="$(build-linux-node-labels "${node_type}")"
|
||||
|
@ -143,8 +143,6 @@ type KubeletFlags struct {
|
||||
// schedulable. Won't have any effect if register-node is false.
|
||||
// DEPRECATED: use registerWithTaints instead
|
||||
RegisterSchedulable bool
|
||||
// nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
|
||||
NonMasqueradeCIDR string
|
||||
// This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node.
|
||||
// This can be useful for debugging volume related issues.
|
||||
KeepTerminatedPodVolumes bool
|
||||
@ -163,7 +161,6 @@ func NewKubeletFlags() *KubeletFlags {
|
||||
MaxContainerCount: -1,
|
||||
MaxPerPodContainerCount: 1,
|
||||
MinimumGCAge: metav1.Duration{Duration: 0},
|
||||
NonMasqueradeCIDR: "10.0.0.0/8",
|
||||
RegisterSchedulable: true,
|
||||
NodeLabels: make(map[string]string),
|
||||
}
|
||||
@ -337,8 +334,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) {
|
||||
fs.MarkDeprecated("master-service-namespace", "This flag will be removed in a future version.")
|
||||
fs.BoolVar(&f.RegisterSchedulable, "register-schedulable", f.RegisterSchedulable, "Register the node as schedulable. Won't have any effect if register-node is false.")
|
||||
fs.MarkDeprecated("register-schedulable", "will be removed in a future version")
|
||||
fs.StringVar(&f.NonMasqueradeCIDR, "non-masquerade-cidr", f.NonMasqueradeCIDR, "Traffic to IPs outside this range will use IP masquerade. Set to '0.0.0.0/0' to never masquerade.")
|
||||
fs.MarkDeprecated("non-masquerade-cidr", "will be removed in a future version")
|
||||
fs.BoolVar(&f.KeepTerminatedPodVolumes, "keep-terminated-pod-volumes", f.KeepTerminatedPodVolumes, "Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.")
|
||||
fs.MarkDeprecated("keep-terminated-pod-volumes", "will be removed in a future version")
|
||||
fs.StringVar(&f.ExperimentalMounterPath, "experimental-mounter-path", f.ExperimentalMounterPath, "[Experimental] Path of mounter binary. Leave empty to use the default mount.")
|
||||
|
@ -773,8 +773,7 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
|
||||
s.ContainerRuntime,
|
||||
s.RuntimeCgroups,
|
||||
s.RemoteRuntimeEndpoint,
|
||||
s.RemoteImageEndpoint,
|
||||
s.NonMasqueradeCIDR)
|
||||
s.RemoteImageEndpoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -289,8 +289,7 @@ func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
|
||||
containerRuntime string,
|
||||
runtimeCgroups string,
|
||||
remoteRuntimeEndpoint string,
|
||||
remoteImageEndpoint string,
|
||||
nonMasqueradeCIDR string) error {
|
||||
remoteImageEndpoint string) error {
|
||||
if remoteRuntimeEndpoint != "" {
|
||||
// remoteImageEndpoint is same as remoteRuntimeEndpoint if not explicitly specified
|
||||
if remoteImageEndpoint == "" {
|
||||
|
@ -2356,7 +2356,7 @@ func TestSyncTerminatingPodKillPod(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPreInitRuntimeService(t *testing.T) {
|
||||
err := PreInitRuntimeService(nil, nil, nil, "", "", "", "", "")
|
||||
err := PreInitRuntimeService(nil, nil, nil, "", "", "", "")
|
||||
if err == nil {
|
||||
t.Fatal("PreInitRuntimeService should fail when not configured with a container runtime")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user