Skip to content

Commit

Permalink
To add back kubeconfig flag missing in v5.0.x (#1561)
Browse files Browse the repository at this point in the history
Adding missing flag
  • Loading branch information
cniackz committed Apr 12, 2023
1 parent 471bc5d commit 8b76546
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cmd/operator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ var controllerCmd = cli.Command{
Aliases: []string{"ctl"},
Usage: "Start MinIO Operator Controller",
Action: startController,
Flags: []cli.Flag{
cli.StringFlag{
Name: "kubeconfig",
Usage: "Load configuration from `KUBECONFIG`",
},
},
}

func startController(ctx *cli.Context) {
controller.StartOperator()
controller.StartOperator(ctx.String("kubeconfig"))
}
2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func init() {
}

// StartOperator starts the MinIO Operator controller
func StartOperator() {
func StartOperator(kubeconfig string) {
klog.Info("Starting MinIO Operator")
// set up signals, so we handle the first shutdown signal gracefully
stopCh := setupSignalHandler()
Expand Down

0 comments on commit 8b76546

Please sign in to comment.