mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #40048 from mtaufen/remove-deprecated-flags
Automatic merge from submit-queue (batch tested with PRs 41121, 40048, 40502, 41136, 40759) Remove deprecated kubelet flags that look safe to remove Removes: ``` --config --auth-path --resource-container --system-container ``` which have all been marked deprecated since at least 1.4 and look safe to remove. ```release-note The deprecated flags --config, --auth-path, --resource-container, and --system-container were removed. ```
This commit is contained in:
		@@ -477,7 +477,7 @@ function start-kubelet {
 | 
				
			|||||||
  flags+=" --cloud-provider=gce"
 | 
					  flags+=" --cloud-provider=gce"
 | 
				
			||||||
  flags+=" --cluster-dns=${DNS_SERVER_IP}"
 | 
					  flags+=" --cluster-dns=${DNS_SERVER_IP}"
 | 
				
			||||||
  flags+=" --cluster-domain=${DNS_DOMAIN}"
 | 
					  flags+=" --cluster-domain=${DNS_DOMAIN}"
 | 
				
			||||||
  flags+=" --config=/etc/kubernetes/manifests"
 | 
					  flags+=" --pod-manifest-path=/etc/kubernetes/manifests"
 | 
				
			||||||
  flags+=" --experimental-check-node-capabilities-before-mount=true"
 | 
					  flags+=" --experimental-check-node-capabilities-before-mount=true"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [[ -n "${KUBELET_PORT:-}" ]]; then
 | 
					  if [[ -n "${KUBELET_PORT:-}" ]]; then
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -556,7 +556,7 @@ function start-kubelet {
 | 
				
			|||||||
  flags+=" --cloud-provider=gce"
 | 
					  flags+=" --cloud-provider=gce"
 | 
				
			||||||
  flags+=" --cluster-dns=${DNS_SERVER_IP}"
 | 
					  flags+=" --cluster-dns=${DNS_SERVER_IP}"
 | 
				
			||||||
  flags+=" --cluster-domain=${DNS_DOMAIN}"
 | 
					  flags+=" --cluster-domain=${DNS_DOMAIN}"
 | 
				
			||||||
  flags+=" --config=/etc/kubernetes/manifests"
 | 
					  flags+=" --pod-manifest-path=/etc/kubernetes/manifests"
 | 
				
			||||||
  flags+=" --experimental-mounter-path=${KUBE_HOME}/bin/mounter"
 | 
					  flags+=" --experimental-mounter-path=${KUBE_HOME}/bin/mounter"
 | 
				
			||||||
  flags+=" --experimental-check-node-capabilities-before-mount=true"
 | 
					  flags+=" --experimental-check-node-capabilities-before-mount=true"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -175,7 +175,7 @@ assemble_kubelet_flags() {
 | 
				
			|||||||
    KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --node-labels=${NODE_LABELS}"
 | 
					    KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --node-labels=${NODE_LABELS}"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  # Add the unconditional flags
 | 
					  # Add the unconditional flags
 | 
				
			||||||
  KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --cloud-provider=gce --allow-privileged=true --cgroup-root=/ --system-cgroups=/system --kubelet-cgroups=/kubelet --babysit-daemons=true --config=/etc/kubernetes/manifests --cluster-dns=${DNS_SERVER_IP} --cluster-domain=${DNS_DOMAIN}"
 | 
					  KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --cloud-provider=gce --allow-privileged=true --cgroup-root=/ --system-cgroups=/system --kubelet-cgroups=/kubelet --babysit-daemons=true --pod-manifest-path=/etc/kubernetes/manifests --cluster-dns=${DNS_SERVER_IP} --cluster-domain=${DNS_DOMAIN}"
 | 
				
			||||||
  echo "KUBELET_OPTS=\"${KUBELET_CMD_FLAGS}\"" > /etc/default/kubelet
 | 
					  echo "KUBELET_OPTS=\"${KUBELET_CMD_FLAGS}\"" > /etc/default/kubelet
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,7 +72,7 @@ function create_cluster {
 | 
				
			|||||||
      --hostname-override="127.0.0.1" \
 | 
					      --hostname-override="127.0.0.1" \
 | 
				
			||||||
      --address="0.0.0.0" \
 | 
					      --address="0.0.0.0" \
 | 
				
			||||||
      --api-servers=http://localhost:8080 \
 | 
					      --api-servers=http://localhost:8080 \
 | 
				
			||||||
      --config=/etc/kubernetes/manifests \
 | 
					      --pod-manifest-path=/etc/kubernetes/manifests \
 | 
				
			||||||
      --allow-privileged=true \
 | 
					      --allow-privileged=true \
 | 
				
			||||||
      --cluster-dns=10.0.0.10 \
 | 
					      --cluster-dns=10.0.0.10 \
 | 
				
			||||||
      --cluster-domain=cluster.local \
 | 
					      --cluster-domain=cluster.local \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@ coreos:
 | 
				
			|||||||
        --tls-private-key-file=/opt/kubernetes/certs/${NODE_NAMES[$i]}-node-key.pem \
 | 
					        --tls-private-key-file=/opt/kubernetes/certs/${NODE_NAMES[$i]}-node-key.pem \
 | 
				
			||||||
        $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-dns=${DNS_SERVER_IP}" ) \
 | 
					        $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-dns=${DNS_SERVER_IP}" ) \
 | 
				
			||||||
        $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-domain=${DNS_DOMAIN}" ) \
 | 
					        $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-domain=${DNS_DOMAIN}" ) \
 | 
				
			||||||
        --config=/opt/kubernetes/manifests
 | 
					        --pod-manifest-path=/opt/kubernetes/manifests
 | 
				
			||||||
        Restart=always
 | 
					        Restart=always
 | 
				
			||||||
        RestartSec=2
 | 
					        RestartSec=2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,7 +55,7 @@
 | 
				
			|||||||
  {% set cloud_config = "--cloud-config=" + grains.cloud_config -%}
 | 
					  {% set cloud_config = "--cloud-config=" + grains.cloud_config -%}
 | 
				
			||||||
{% endif -%}
 | 
					{% endif -%}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% set config = "--config=/etc/kubernetes/manifests" -%}
 | 
					{% set config = "--pod-manifest-path=/etc/kubernetes/manifests" -%}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% set manifest_url = "" -%}
 | 
					{% set manifest_url = "" -%}
 | 
				
			||||||
{% set manifest_url_header = "" -%}
 | 
					{% set manifest_url_header = "" -%}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,8 +49,7 @@ type KubeletServer struct {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// If true, an invalid KubeConfig will result in the Kubelet exiting with an error.
 | 
						// If true, an invalid KubeConfig will result in the Kubelet exiting with an error.
 | 
				
			||||||
	RequireKubeConfig bool
 | 
						RequireKubeConfig bool
 | 
				
			||||||
	AuthPath          flag.StringFlag // Deprecated -- use KubeConfig instead
 | 
						APIServerList     []string // Deprecated -- use KubeConfig instead
 | 
				
			||||||
	APIServerList     []string        // Deprecated -- use KubeConfig instead
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Insert a probability of random errors during calls to the master.
 | 
						// Insert a probability of random errors during calls to the master.
 | 
				
			||||||
	ChaosChance float64
 | 
						ChaosChance float64
 | 
				
			||||||
@@ -87,13 +86,9 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
 | 
				
			|||||||
	fs.BoolVar(&s.RequireKubeConfig, "require-kubeconfig", s.RequireKubeConfig, "If true the Kubelet will exit if there are configuration errors, and will ignore the value of --api-servers in favor of the server defined in the kubeconfig file.")
 | 
						fs.BoolVar(&s.RequireKubeConfig, "require-kubeconfig", s.RequireKubeConfig, "If true the Kubelet will exit if there are configuration errors, and will ignore the value of --api-servers in favor of the server defined in the kubeconfig file.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// DEPRECATED: Remove these flags at the beginning of 1.5.
 | 
						// DEPRECATED: Remove these flags at the beginning of 1.5.
 | 
				
			||||||
	fs.Var(&s.AuthPath, "auth-path", "Path to .kubernetes_auth file, specifying how to authenticate to API server.")
 | 
					 | 
				
			||||||
	fs.MarkDeprecated("auth-path", "will be removed in a future version")
 | 
					 | 
				
			||||||
	fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.")
 | 
						fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.")
 | 
				
			||||||
	fs.MarkDeprecated("api-servers", "Use --kubeconfig instead. Will be removed in a future version.")
 | 
						fs.MarkDeprecated("api-servers", "Use --kubeconfig instead. Will be removed in a future version.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fs.StringVar(&s.PodManifestPath, "config", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.")
 | 
					 | 
				
			||||||
	fs.MarkDeprecated("config", "Use --pod-manifest-path instead. Will be removed in a future version.")
 | 
					 | 
				
			||||||
	fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.")
 | 
						fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.")
 | 
				
			||||||
	fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config")
 | 
						fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config")
 | 
				
			||||||
	fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data")
 | 
						fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data")
 | 
				
			||||||
@@ -188,12 +183,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
 | 
				
			|||||||
	fs.StringVar(&s.FeatureGates, "feature-gates", s.FeatureGates, "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
 | 
						fs.StringVar(&s.FeatureGates, "feature-gates", s.FeatureGates, "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
 | 
				
			||||||
		"Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n"))
 | 
							"Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fs.StringVar(&s.KubeletCgroups, "resource-container", s.KubeletCgroups, "Optional absolute name of the resource-only container to create and run the Kubelet in.")
 | 
					 | 
				
			||||||
	fs.MarkDeprecated("resource-container", "Use --kubelet-cgroups instead. Will be removed in a future version.")
 | 
					 | 
				
			||||||
	fs.StringVar(&s.KubeletCgroups, "kubelet-cgroups", s.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.")
 | 
						fs.StringVar(&s.KubeletCgroups, "kubelet-cgroups", s.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.")
 | 
				
			||||||
 | 
					 | 
				
			||||||
	fs.StringVar(&s.SystemCgroups, "system-container", s.SystemCgroups, "Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").")
 | 
					 | 
				
			||||||
	fs.MarkDeprecated("system-container", "Use --system-cgroups instead. Will be removed in a future version.")
 | 
					 | 
				
			||||||
	fs.StringVar(&s.SystemCgroups, "system-cgroups", s.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").")
 | 
						fs.StringVar(&s.SystemCgroups, "system-cgroups", s.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fs.BoolVar(&s.CgroupsPerQOS, "cgroups-per-qos", s.CgroupsPerQOS, "Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.")
 | 
						fs.BoolVar(&s.CgroupsPerQOS, "cgroups-per-qos", s.CgroupsPerQOS, "Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,8 +29,6 @@ audit-log-maxage
 | 
				
			|||||||
audit-log-maxbackup
 | 
					audit-log-maxbackup
 | 
				
			||||||
audit-log-maxsize
 | 
					audit-log-maxsize
 | 
				
			||||||
audit-log-path
 | 
					audit-log-path
 | 
				
			||||||
auth-path
 | 
					 | 
				
			||||||
auth-path
 | 
					 | 
				
			||||||
auth-provider
 | 
					auth-provider
 | 
				
			||||||
auth-provider
 | 
					auth-provider
 | 
				
			||||||
auth-provider-arg
 | 
					auth-provider-arg
 | 
				
			||||||
@@ -593,7 +591,6 @@ streaming-connection-idle-timeout
 | 
				
			|||||||
suicide-timeout
 | 
					suicide-timeout
 | 
				
			||||||
sync-frequency
 | 
					sync-frequency
 | 
				
			||||||
system-cgroups
 | 
					system-cgroups
 | 
				
			||||||
system-container
 | 
					 | 
				
			||||||
system-pods-startup-timeout
 | 
					system-pods-startup-timeout
 | 
				
			||||||
system-reserved
 | 
					system-reserved
 | 
				
			||||||
system-validate-mode
 | 
					system-validate-mode
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -156,7 +156,7 @@ start_kubelet --api-servers $apiserver \
 | 
				
			|||||||
  --volume-stats-agg-period $volume_stats_agg_period \
 | 
					  --volume-stats-agg-period $volume_stats_agg_period \
 | 
				
			||||||
  --allow-privileged=$allow_privileged \
 | 
					  --allow-privileged=$allow_privileged \
 | 
				
			||||||
  --serialize-image-pulls=$serialize_image_pulls \
 | 
					  --serialize-image-pulls=$serialize_image_pulls \
 | 
				
			||||||
  --config $config_dir \
 | 
					  --pod-manifest-path $config_dir \
 | 
				
			||||||
  --file-check-frequency $file_check_frequency \
 | 
					  --file-check-frequency $file_check_frequency \
 | 
				
			||||||
  --pod-cidr=$pod_cidr \
 | 
					  --pod-cidr=$pod_cidr \
 | 
				
			||||||
  --runtime-cgroups=/docker-daemon \
 | 
					  --runtime-cgroups=/docker-daemon \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -131,7 +131,7 @@ func (e *E2EServices) startKubelet() (*server, error) {
 | 
				
			|||||||
		"--volume-stats-agg-period", "10s", // Aggregate volumes frequently so tests don't need to wait as long
 | 
							"--volume-stats-agg-period", "10s", // Aggregate volumes frequently so tests don't need to wait as long
 | 
				
			||||||
		"--allow-privileged", "true",
 | 
							"--allow-privileged", "true",
 | 
				
			||||||
		"--serialize-image-pulls", "false",
 | 
							"--serialize-image-pulls", "false",
 | 
				
			||||||
		"--config", manifestPath,
 | 
							"--pod-manifest-path", manifestPath,
 | 
				
			||||||
		"--file-check-frequency", "10s", // Check file frequently so tests won't wait too long
 | 
							"--file-check-frequency", "10s", // Check file frequently so tests won't wait too long
 | 
				
			||||||
		"--pod-cidr", "10.180.0.0/24", // Assign a fixed CIDR to the node because there is no node controller.
 | 
							"--pod-cidr", "10.180.0.0/24", // Assign a fixed CIDR to the node because there is no node controller.
 | 
				
			||||||
		"--eviction-pressure-transition-period", "30s",
 | 
							"--eviction-pressure-transition-period", "30s",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -210,7 +210,7 @@ function compute-kubelet-params {
 | 
				
			|||||||
	params+=" --babysit-daemons=true"
 | 
						params+=" --babysit-daemons=true"
 | 
				
			||||||
	params+=" --cgroup-root=/"
 | 
						params+=" --cgroup-root=/"
 | 
				
			||||||
	params+=" --cloud-provider=gce"
 | 
						params+=" --cloud-provider=gce"
 | 
				
			||||||
	params+=" --config=/etc/kubernetes/manifests"
 | 
						params+=" --pod-manifest-path=/etc/kubernetes/manifests"
 | 
				
			||||||
	if [[ -n "${KUBELET_PORT:-}" ]]; then
 | 
						if [[ -n "${KUBELET_PORT:-}" ]]; then
 | 
				
			||||||
		params+=" --port=${KUBELET_PORT}"
 | 
							params+=" --port=${KUBELET_PORT}"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user