Skip to content

Commit

Permalink
Remove default kubeconfig value
Browse files Browse the repository at this point in the history
This fix in-cluster application
  • Loading branch information
guilhem committed Apr 18, 2018
1 parent ccc4136 commit 5f82dcb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"fmt"
"os"
"os/signal"
"path/filepath"
"syscall"
"time"

Expand Down Expand Up @@ -68,9 +67,7 @@ func init() {
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")

// Get the user kubernetes configuration in it's home directory.
kubehome := filepath.Join(homedir.HomeDir(), ".kube", "config")
rootCmd.PersistentFlags().String("kubeconfig", kubehome, "Path to a kubeconfig. Only required if out-of-cluster.")
rootCmd.PersistentFlags().String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
viper.BindPFlag("kubeconfig", rootCmd.PersistentFlags().Lookup("kubeconfig"))
rootCmd.PersistentFlags().String("master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
viper.BindPFlag("master", rootCmd.PersistentFlags().Lookup("master"))
Expand Down

0 comments on commit 5f82dcb

Please sign in to comment.