Merge pull request #105637 from Namanl2001/ssh

adding `--ssh-key` and `--ssh-user` for kubetest2
This commit is contained in:
Kubernetes Prow Robot
2021-10-26 16:33:45 -07:00
committed by GitHub
3 changed files with 9 additions and 1 deletions

View File

@@ -44,8 +44,12 @@ func init() {
sshOptionsMap = map[string]string{
"gce": "-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o LogLevel=ERROR",
}
defaultGceKey := os.Getenv("GCE_SSH_PRIVATE_KEY_FILE")
if defaultGceKey == "" {
defaultGceKey = fmt.Sprintf("%s/.ssh/google_compute_engine", usr.HomeDir)
}
sshDefaultKeyMap = map[string]string{
"gce": fmt.Sprintf("%s/.ssh/google_compute_engine", usr.HomeDir),
"gce": defaultGceKey,
}
}