mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
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:
parent
1c18310db5
commit
34b2c4e1ed
@ -86,6 +86,11 @@ func GetSigner(provider string) (ssh.Signer, error) {
|
|||||||
if keyfile == "" {
|
if keyfile == "" {
|
||||||
keyfile = "id_rsa"
|
keyfile = "id_rsa"
|
||||||
}
|
}
|
||||||
|
case "azure":
|
||||||
|
keyfile = os.Getenv("AZURE_SSH_KEY")
|
||||||
|
if keyfile == "" {
|
||||||
|
keyfile = "id_rsa"
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("GetSigner(...) not implemented for %s", provider)
|
return nil, fmt.Errorf("GetSigner(...) not implemented for %s", provider)
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ var (
|
|||||||
BusyBoxImage = imageutils.GetE2EImage(imageutils.BusyBox)
|
BusyBoxImage = imageutils.GetE2EImage(imageutils.BusyBox)
|
||||||
|
|
||||||
// ProvidersWithSSH are those providers where each node is accessible with SSH
|
// 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 is a serve hostname image name.
|
||||||
ServeHostnameImage = imageutils.GetE2EImage(imageutils.Agnhost)
|
ServeHostnameImage = imageutils.GetE2EImage(imageutils.Agnhost)
|
||||||
|
Loading…
Reference in New Issue
Block a user