mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-19 07:25:19 +00:00
Remove deprecated pod-infra-container-image flag
This commit is contained in:
@@ -321,8 +321,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) {
|
||||
func addContainerRuntimeFlags(fs *pflag.FlagSet, o *kubeletconfig.ContainerRuntimeOptions) {
|
||||
// General settings.
|
||||
fs.StringVar(&o.RuntimeCgroups, "runtime-cgroups", o.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.")
|
||||
_ = fs.String("pod-infra-container-image", "", "Specified image will not be pruned by the image garbage collector. CRI implementations have their own configuration to set this image.")
|
||||
_ = fs.MarkDeprecated("pod-infra-container-image", "will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.")
|
||||
|
||||
// Image credential provider settings.
|
||||
fs.StringVar(&o.ImageCredentialProviderConfigPath, "image-credential-provider-config", o.ImageCredentialProviderConfigPath, "Path to a credential provider plugin config file (JSON/YAML/YML) or a directory of such files (merged in lexicographical order; non-recursive search).")
|
||||
|
||||
@@ -209,11 +209,6 @@ is checked every 20 seconds (also configurable with a flag).`,
|
||||
return fmt.Errorf("failed to validate kubelet flags: %w", err)
|
||||
}
|
||||
|
||||
if cleanFlagSet.Changed("pod-infra-container-image") {
|
||||
logger.Info("--pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime")
|
||||
_ = cmd.Flags().MarkDeprecated("pod-infra-container-image", "--pod-infra-container-image will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.")
|
||||
}
|
||||
|
||||
// load kubelet config file, if provided
|
||||
if len(kubeletFlags.KubeletConfigFile) > 0 {
|
||||
kubeletConfig, err = loadConfigFile(ctx, kubeletFlags.KubeletConfigFile)
|
||||
|
||||
Reference in New Issue
Block a user