From 75b72c7ccbaba2f2fa95e4a1c594d456fe8ee761 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Thu, 7 Feb 2019 20:52:50 -0700 Subject: [PATCH] Hide deprecated warnings --- cmd/kubelet/app/options/options.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index a6efdadb7a9..506cf06a10b 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -330,31 +330,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfiguration) { fs := pflag.NewFlagSet("", pflag.ExitOnError) defer func() { - // All KubeletConfiguration flags are now deprecated, and any new flags that point to - // KubeletConfiguration fields are deprecated-on-creation. When removing flags at the end - // of their deprecation period, be careful to check that they have *actually* been deprecated - // members of the KubeletConfiguration for the entire deprecation period: - // e.g. if a flag was added after this deprecation function, it may not be at the end - // of its lifetime yet, even if the rest are. - deprecated := "This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information." - // Some flags are permanently (?) meant to be available. In - // Kubernetes 1.23, the following options were added to - // LoggingConfiguration (long-term goal, more complete - // configuration file) but deprecating the flags seemed - // premature. - notDeprecated := map[string]bool{ - "v": true, - "vmodule": true, - "log-flush-frequency": true, - "provider-id": true, - "fail-cgroupv1": true, - } - fs.VisitAll(func(f *pflag.Flag) { - if notDeprecated[f.Name] { - return - } - f.Deprecated = deprecated - }) mainfs.AddFlagSet(fs) }()