1
0
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:
Bill Maxwell
2018-03-05 17:52:43 -07:00
parent f76f954b42
commit ad0bc6c0aa
6 changed files with 74 additions and 24 deletions

View File

@@ -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, "")
}