From 34b2c4e1ed0bf5a843574c99f4f93faba3f4b351 Mon Sep 17 00:00:00 2001 From: Aravindh Puthiyaparambil Date: Thu, 2 Nov 2023 15:01:31 -0700 Subject: [PATCH] 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. --- test/e2e/framework/ssh/ssh.go | 5 +++++ test/e2e/framework/util.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/framework/ssh/ssh.go b/test/e2e/framework/ssh/ssh.go index b10456bf63d..774ca1b35d7 100644 --- a/test/e2e/framework/ssh/ssh.go +++ b/test/e2e/framework/ssh/ssh.go @@ -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) } diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 9e88a91a8a7..16b7be34aef 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -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)