mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #32560 from dshulyak/enable_signer_for_vagrant
Automatic merge from submit-queue Allow to use GetSigner with vagrant provider In order to run tests that require ssh access to a node on vagrant we need to provide path to private ssh key. Now it will be possible to do using VAGRANT_SSH_KEY environment variable
This commit is contained in:
commit
b77e2728d8
@ -4113,6 +4113,12 @@ func GetSigner(provider string) (ssh.Signer, error) {
|
||||
}
|
||||
// Otherwise revert to home dir
|
||||
keyfile = "kube_aws_rsa"
|
||||
case "vagrant":
|
||||
keyfile := os.Getenv("VAGRANT_SSH_KEY")
|
||||
if len(keyfile) != 0 {
|
||||
return sshutil.MakePrivateKeySignerFromFile(keyfile)
|
||||
}
|
||||
return nil, fmt.Errorf("VAGRANT_SSH_KEY env variable should be provided")
|
||||
default:
|
||||
return nil, fmt.Errorf("GetSigner(...) not implemented for %s", provider)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user