1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

topology-updater:fix klog initialization

We should use the same flag set for both program and klog arguments.
Otherwise we won't be able to provide klog flags properly

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
This commit is contained in:
Talor Itzhak 2021-10-11 21:36:54 +03:00
parent 06e7a784f3
commit 674720e922

View file

@ -118,13 +118,7 @@ func initFlags(flagset *flag.FlagSet) (*topology.Args, *resourcemonitor.Args) {
flagset.StringVar(&args.ServerNameOverride, "server-name-override", "", flagset.StringVar(&args.ServerNameOverride, "server-name-override", "",
"Hostname expected from server certificate, useful in testing") "Hostname expected from server certificate, useful in testing")
initKlogFlags(flagset) klog.InitFlags(flagset)
return args, resourcemonitorArgs return args, resourcemonitorArgs
} }
func initKlogFlags(flagset *flag.FlagSet) {
flags := flag.NewFlagSet("klog flags", flag.ExitOnError)
//flags.SetOutput(ioutil.Discard)
klog.InitFlags(flags)
}