From fed70da00309e413883bf4a6529e474e7bb91923 Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Wed, 18 Dec 2024 17:15:55 +0100 Subject: [PATCH] Enable verbose logging --- cmd/operator/controller.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/operator/controller.go b/cmd/operator/controller.go index ff4ad600163..1c2286213d7 100644 --- a/cmd/operator/controller.go +++ b/cmd/operator/controller.go @@ -15,6 +15,9 @@ package main import ( + "flag" + "strconv" + "github.com/minio/cli" "github.com/minio/operator/pkg/controller" ) @@ -30,9 +33,17 @@ var controllerCmd = cli.Command{ Name: "kubeconfig", Usage: "Load configuration from `KUBECONFIG`", }, + cli.IntFlag{ + Name: "v", + Usage: "logging level", + }, }, } func startController(ctx *cli.Context) { + if ctx.Int("v") > 0 { + flag.Set("v", strconv.Itoa(ctx.Int("v"))) + flag.Parse() + } controller.StartOperator(ctx.String("kubeconfig")) }