diff --git a/controllers/nginx/pkg/cmd/controller/nginx.go b/controllers/nginx/pkg/cmd/controller/nginx.go index f8685deeeb..23bf903bd2 100644 --- a/controllers/nginx/pkg/cmd/controller/nginx.go +++ b/controllers/nginx/pkg/cmd/controller/nginx.go @@ -271,7 +271,7 @@ func (n *NGINXController) OverrideFlags(flags *pflag.FlagSet) { } flags.Set("ingress-class", ic) - n.stats = newStatsCollector(ic, wc, n.binary) + n.stats = newStatsCollector(wc, ic, n.binary) } // DefaultIngressClass just return the default ingress class diff --git a/core/pkg/ingress/controller/launch.go b/core/pkg/ingress/controller/launch.go index d532c06532..7f02833c63 100644 --- a/core/pkg/ingress/controller/launch.go +++ b/core/pkg/ingress/controller/launch.go @@ -86,11 +86,11 @@ func NewIngressController(backend ingress.Controller) *GenericController { electionID = flags.String("election-id", "ingress-controller-leader", `Election id to use for status update.`) ) - backend.OverrideFlags(flags) - flags.AddGoFlagSet(flag.CommandLine) flags.Parse(os.Args) + backend.OverrideFlags(flags) + flag.Set("logtostderr", "true") glog.Info(backend.Info())