use pflag.MarkDeprecated

This commit is contained in:
hzxuzhonghu 2017-12-27 11:31:36 +08:00
parent 551bf8a129
commit 5c039b2dab

View file

@ -95,7 +95,7 @@ func parseFlags() (bool, *controller.Configuration, error) {
`Force namespace isolation. This flag is required to avoid the reference of secrets or
configmaps located in a different namespace than the specified in the flag --watch-namespace.`)
disableNodeList = flags.Bool("disable-node-list", false,
_ = flags.Bool("disable-node-list", false,
`Disable querying nodes. If --force-namespace-isolation is true, this should also be set. (DEPRECATED)`)
updateStatusOnShutdown = flags.Bool("update-status-on-shutdown", true, `Indicates if the
@ -131,6 +131,8 @@ func parseFlags() (bool, *controller.Configuration, error) {
`Define the sync frequency upper limit`)
)
flags.MarkDeprecated("disable-node-list", "This flag is currently no-op and will be deleted.")
flag.Set("logtostderr", "true")
flags.AddGoFlagSet(flag.CommandLine)
@ -181,11 +183,6 @@ func parseFlags() (bool, *controller.Configuration, error) {
return false, nil, fmt.Errorf("Port %v is already in use. Please check the flag --ssl-passtrough-proxy-port", *sslProxyPort)
}
// TODO: remove disableNodeList flag
if *disableNodeList {
glog.Warningf("%s is DEPRECATED and will be removed in a future version.", disableNodeList)
}
if !*enableSSLChainCompletion {
glog.Warningf("Check of SSL certificate chain is disabled (--enable-ssl-chain-completion=false)")
}