framework: add SSH support for Azure

Add Azure to the list of providers that support accessing nodes
using SSH.
Note: This will require a follow up PR adding the required
environment variables, AZURE_SSH_KEY, KUBE_SSH_BASTION to the test
configuration.
This commit is contained in:
Aravindh Puthiyaparambil 2023-11-02 15:01:31 -07:00
parent 1c18310db5
commit 34b2c4e1ed
No known key found for this signature in database
GPG Key ID: 2281DA6B582F6AA6
2 changed files with 6 additions and 1 deletions

View File

@ -86,6 +86,11 @@ func GetSigner(provider string) (ssh.Signer, error) {
if keyfile == "" {
keyfile = "id_rsa"
}
case "azure":
keyfile = os.Getenv("AZURE_SSH_KEY")
if keyfile == "" {
keyfile = "id_rsa"
}
default:
return nil, fmt.Errorf("GetSigner(...) not implemented for %s", provider)
}

View File

@ -136,7 +136,7 @@ var (
BusyBoxImage = imageutils.GetE2EImage(imageutils.BusyBox)
// ProvidersWithSSH are those providers where each node is accessible with SSH
ProvidersWithSSH = []string{"gce", "gke", "aws", "local"}
ProvidersWithSSH = []string{"gce", "gke", "aws", "local", "azure"}
// ServeHostnameImage is a serve hostname image name.
ServeHostnameImage = imageutils.GetE2EImage(imageutils.Agnhost)