Commit 3bea81fc authored by Darren Shepherd's avatar Darren Shepherd Committed by Erik Wilson

Hide deprecated warnings

parent 9971dee5
...@@ -459,16 +459,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { ...@@ -459,16 +459,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) {
func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfiguration) { func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfiguration) {
fs := pflag.NewFlagSet("", pflag.ExitOnError) fs := pflag.NewFlagSet("", pflag.ExitOnError)
defer func() { 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."
fs.VisitAll(func(f *pflag.Flag) {
f.Deprecated = deprecated
})
mainfs.AddFlagSet(fs) mainfs.AddFlagSet(fs)
}() }()
......
...@@ -75,8 +75,6 @@ func (s *DeprecatedInsecureServingOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -75,8 +75,6 @@ func (s *DeprecatedInsecureServingOptions) AddFlags(fs *pflag.FlagSet) {
fs.IntVar(&s.BindPort, "insecure-port", s.BindPort, ""+ fs.IntVar(&s.BindPort, "insecure-port", s.BindPort, ""+
"The port on which to serve unsecured, unauthenticated access.") "The port on which to serve unsecured, unauthenticated access.")
// Though this flag is deprecated, we discovered security concerns over how to do health checks without it e.g. #43784
fs.MarkDeprecated("insecure-port", "This flag will be removed in a future version.")
fs.Lookup("insecure-port").Hidden = false fs.Lookup("insecure-port").Hidden = false
} }
...@@ -92,7 +90,6 @@ func (s *DeprecatedInsecureServingOptions) AddUnqualifiedFlags(fs *pflag.FlagSet ...@@ -92,7 +90,6 @@ func (s *DeprecatedInsecureServingOptions) AddUnqualifiedFlags(fs *pflag.FlagSet
fs.Lookup("address").Hidden = false fs.Lookup("address").Hidden = false
fs.IntVar(&s.BindPort, "port", s.BindPort, "The port on which to serve unsecured, unauthenticated access. Set to 0 to disable.") fs.IntVar(&s.BindPort, "port", s.BindPort, "The port on which to serve unsecured, unauthenticated access. Set to 0 to disable.")
fs.MarkDeprecated("port", "see --secure-port instead.")
fs.Lookup("port").Hidden = false fs.Lookup("port").Hidden = false
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment