Skip to content

Commit 1858075

Browse files
authored
cmd/catalog: Default to the $KUBECONFIG environment variable (#2303)
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 <[email protected]>
1 parent e9aef37 commit 1858075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/catalog/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
// config flags defined globally so that they appear on the test binary as well
3939
var (
4040
kubeConfigPath = flag.String(
41-
"kubeconfig", "", "absolute path to the kubeconfig file")
41+
"kubeconfig", os.Getenv("KUBECONFIG"), "absolute path to the kubeconfig file")
4242

4343
wakeupInterval = flag.Duration(
4444
"interval", defaultWakeupInterval, "wakeup interval")

0 commit comments

Comments
 (0)