mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
New package defines .kubernetes_auth format.
Refactored common code to that package. Subsequent PRs will load and emit these files.
This commit is contained in:
@@ -175,7 +175,9 @@ func GetKubeConfig(cmd *cobra.Command) *client.Config {
|
||||
// command line). Override them with the command line parameters, if
|
||||
// provided.
|
||||
authPath := GetFlagString(cmd, "auth-path")
|
||||
authInfo, err := kubectl.LoadAuthInfo(authPath, os.Stdin)
|
||||
authInfo, err := kubectl.LoadClientAuthInfoOrPrompt(authPath, os.Stdin)
|
||||
// TODO: handle the case where the file could not be written but
|
||||
// we still got a user/pass from prompting.
|
||||
if err != nil {
|
||||
glog.Fatalf("Error loading auth: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user