From 471d56b46597fb359fd51189fd9935c40afd5224 Mon Sep 17 00:00:00 2001 From: NilanjanDaw Date: Tue, 15 Feb 2022 06:05:12 +0000 Subject: [PATCH] moving to k8s style verbosity management --- agent/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/main.go b/agent/main.go index 41bf9e67b..f85cea4b6 100644 --- a/agent/main.go +++ b/agent/main.go @@ -18,6 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/klog" "k8s.io/klog/klogr" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ctrl "sigs.k8s.io/controller-runtime" @@ -85,6 +86,7 @@ var ( // TODO - fix logging func main() { + klog.InitFlags(nil) flag.StringVar(&namespace, "namespace", "default", "Namespace in the management cluster where you would like to register this host") flag.Var(&labels, "label", "labels to attach to the ByoHost CR in the form labelname=labelVal for e.g. '--label site=apac --label cores=2'") flag.StringVar(&metricsbindaddress, "metricsbindaddress", ":8080", "metricsbindaddress is the TCP address that the controller should bind to for serving prometheus metrics.It can be set to \"0\" to disable the metrics serving")