Skip to content

Commit

Permalink
Fixing kubeconfig environment variable.
Browse files Browse the repository at this point in the history
fixes #700
  • Loading branch information
Shawn Hurley committed Nov 6, 2018
1 parent c627d62 commit 6230e28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions commands/operator-sdk/cmd/up/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ func upLocal() {
}

func upLocalAnsible() {
// Set the kubeconfig that the manager will be able to grab
os.Setenv(k8sutil.KubeConfigEnvVar, kubeConfig)
mgr, err := manager.New(config.GetConfigOrDie(), manager.Options{Namespace: namespace})
if err != nil {
log.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/k8sutil/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
package k8sutil

const (
// KubeConfigEnvVar defines the env variable KUBERNETES_CONFIG which
// KubeConfigEnvVar defines the env variable KUBECONFIG which
// contains the kubeconfig file path.
KubeConfigEnvVar = "KUBERNETES_CONFIG"
KubeConfigEnvVar = "KUBECONFIG"

// WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE
// which is the namespace that the pod is currently running in.
Expand Down

0 comments on commit 6230e28

Please sign in to comment.