Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/k8sutil,cmd/up/local: Fixing kubeconfig environment variable. #705

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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