Skip to content

Commit

Permalink
cmd/catalog: Default to the $KUBECONFIG environment variable (#2303)
Browse files Browse the repository at this point in the history
Update the catalog operator and default to the $KUBECONFIG environment
variable value when the --kubeconfig flag hasn't been provided. This
mirrors the same way that the olm operator (e.g. controller-runtime is
handling this check under-the-hood) behaves.

Signed-off-by: timflannagan <timflannagan@gmail.com>
  • Loading branch information
timflannagan authored Feb 10, 2022
1 parent e9aef37 commit 1858075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
// config flags defined globally so that they appear on the test binary as well
var (
kubeConfigPath = flag.String(
"kubeconfig", "", "absolute path to the kubeconfig file")
"kubeconfig", os.Getenv("KUBECONFIG"), "absolute path to the kubeconfig file")

wakeupInterval = flag.Duration(
"interval", defaultWakeupInterval, "wakeup interval")
Expand Down

0 comments on commit 1858075

Please sign in to comment.