mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
Leverage global SSHAgentAuth setting
This addresses users issues in being unable to use RKE command line using SSH_AUTH_SOCK. On OSX the socket env var is set, but nothing is listening. Also, Linux users have reported issues. To address this the default mode is to not use SSH Agent Auth. A user must set it explicitly in either the config file or on the CLI. The only way to use a passphrase protected key file is with a properly configured SSH Agent and using SSH Agent Auth.
This commit is contained in:
@@ -34,6 +34,9 @@ func RemoveCommand() cli.Command {
|
||||
Usage: "Deploy Kubernetes cluster locally",
|
||||
},
|
||||
}
|
||||
|
||||
removeFlags = append(removeFlags, sshCliOptions...)
|
||||
|
||||
return cli.Command{
|
||||
Name: "remove",
|
||||
Usage: "Teardown the cluster and clean cluster nodes",
|
||||
@@ -96,6 +99,12 @@ func clusterRemoveFromCli(ctx *cli.Context) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to parse cluster file: %v", err)
|
||||
}
|
||||
|
||||
rkeConfig, err = setOptionsFromCLI(ctx, rkeConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ClusterRemove(context.Background(), rkeConfig, nil, nil, false, "")
|
||||
}
|
||||
|
||||
@@ -113,5 +122,11 @@ func clusterRemoveLocal(ctx *cli.Context) error {
|
||||
}
|
||||
rkeConfig.Nodes = []v3.RKEConfigNode{*cluster.GetLocalRKENodeConfig()}
|
||||
}
|
||||
|
||||
rkeConfig, err = setOptionsFromCLI(ctx, rkeConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ClusterRemove(context.Background(), rkeConfig, nil, nil, true, "")
|
||||
}
|
||||
|
Reference in New Issue
Block a user