Skip to content

Commit

Permalink
Only update kubeconfig if the proxy supports Kubernetes.
Browse files Browse the repository at this point in the history
  • Loading branch information
russjones committed Nov 14, 2018
1 parent 31d7d36 commit 8ce36a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tool/tsh/tsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,11 @@ func onLogin(cf *CLIConf) {
return
}

// Update kubernetes config file.
if err := kubeclient.UpdateKubeconfig(tc); err != nil {
utils.FatalError(err)
// If the proxy is advertising that it supports Kubernetes, update kubeconfig.
if tc.KubeProxyAddr != "" {
if err := kubeclient.UpdateKubeconfig(tc); err != nil {
utils.FatalError(err)
}
}

// Regular login without -i flag.
Expand Down

0 comments on commit 8ce36a9

Please sign in to comment.