Merge pull request #60 from cloudnativelabs/fix-glog-goflag

Apply glog/goflag noisy log workaround
This commit is contained in:
Murali Reddy 2017-07-13 19:01:45 +05:30 committed by GitHub
commit 1633b762a8

View File

@ -4,6 +4,8 @@ import (
"fmt" "fmt"
"os" "os"
"flag"
"github.com/cloudnativelabs/kube-router/app" "github.com/cloudnativelabs/kube-router/app"
"github.com/cloudnativelabs/kube-router/app/options" "github.com/cloudnativelabs/kube-router/app/options"
"github.com/spf13/pflag" "github.com/spf13/pflag"
@ -15,6 +17,10 @@ func main() {
config.AddFlags(pflag.CommandLine) config.AddFlags(pflag.CommandLine)
pflag.Parse() pflag.Parse()
// Workaround for this issue:
// https://github.com/kubernetes/kubernetes/issues/17162
flag.CommandLine.Parse([]string{})
pflag.Set("logtostderr", "true") pflag.Set("logtostderr", "true")
if config.HelpRequested { if config.HelpRequested {