remove duplicated code
This commit is contained in:
parent
b329786ec3
commit
3fb49cb28a
1 changed files with 7 additions and 7 deletions
|
@ -96,7 +96,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
|
||||
|
@ -132,16 +132,21 @@ 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)
|
||||
flags.Parse(os.Args)
|
||||
flag.Set("logtostderr", "true")
|
||||
|
||||
// Workaround for this issue:
|
||||
// https://github.com/kubernetes/kubernetes/issues/17162
|
||||
flag.CommandLine.Parse([]string{})
|
||||
|
||||
pflag.VisitAll(func(flag *pflag.Flag) {
|
||||
glog.V(2).Infof("FLAG: --%s=%q", flag.Name, flag.Value)
|
||||
})
|
||||
|
||||
if *showVersion {
|
||||
return true, nil, nil
|
||||
}
|
||||
|
@ -183,11 +188,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)")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue