Skip to content

Commit

Permalink
Enable verbose logging (#2371)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein authored Dec 18, 2024
1 parent d165371 commit c3495a7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/operator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
package main

import (
"flag"
"strconv"

"github.com/minio/cli"
"github.com/minio/operator/pkg/controller"
)
Expand All @@ -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"))
}

0 comments on commit c3495a7

Please sign in to comment.