diff --git a/cmd/apiserver/apiserver.go b/cmd/apiserver/apiserver.go index 7eadf131aa7..afcb00bf1be 100644 --- a/cmd/apiserver/apiserver.go +++ b/cmd/apiserver/apiserver.go @@ -20,6 +20,7 @@ limitations under the License. package main import ( + "flag" "os" "github.com/golang/glog" @@ -37,6 +38,9 @@ import ( ) func main() { + // flag init workaround required to quell glog noise + flag.CommandLine.Parse([]string{}) + logs.InitLogs() // make sure we print all the logs while shutting down. defer logs.FlushLogs() diff --git a/cmd/controller-manager/controller-manager.go b/cmd/controller-manager/controller-manager.go index 8e60e181b25..621951f0db0 100644 --- a/cmd/controller-manager/controller-manager.go +++ b/cmd/controller-manager/controller-manager.go @@ -21,6 +21,7 @@ limitations under the License. package main import ( + goflag "flag" "fmt" "os" @@ -40,6 +41,9 @@ func init() { } func main() { + // flag init workaround required to quell glog noise + goflag.CommandLine.Parse([]string{}) + s := options.NewControllerManagerServer() s.AddFlags(pflag.CommandLine) version := pkg.VersionFlag(pflag.CommandLine)