File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,21 @@ capz::util::generate_ssh_key() {
8282 AZURE_SSH_PUBLIC_KEY_FILE=${AZURE_SSH_PUBLIC_KEY_FILE:- " " }
8383 if [ -z " ${AZURE_SSH_PUBLIC_KEY_FILE} " ]; then
8484 echo " generating sshkey for e2e"
85- AZURE_SSH_KEY=.sshkey
85+ AZURE_SSH_KEY=" ${PWD} " /.sshkey
86+ # This is required if e2e.test is run with --provider=skeleton. This option is used when
87+ # running Windows e2e tests against a CAPZ cluster to ensure no extra Azure resources are
88+ # created by e2e.test.
89+ # Ref: https://github.com/kubernetes-sigs/windows-testing/blob/be73dd57a551be4f9527e7a3a3e6491e86cae6d2/capz/run-capz-e2e.sh#L300
90+ # Further more, --provider is what decides which SSH environment variable is used to create
91+ # the signer needed to SSH into nodes.
92+ # Ref: https://github.com/kubernetes/kubernetes/blob/41890534532931742770a7dc98f78bcdc59b1a6f/test/e2e/framework/ssh/ssh.go#L58
93+ KUBE_SSH_KEY=" ${AZURE_SSH_KEY} "
8694 rm -f " ${AZURE_SSH_KEY} " 2> /dev/null
8795 ssh-keygen -t rsa -b 2048 -f " ${AZURE_SSH_KEY} " -N ' ' 1> /dev/null
8896 AZURE_SSH_PUBLIC_KEY_FILE=" ${AZURE_SSH_KEY} .pub"
8997 # This is needed to run tests that required SSH access to nodes
9098 export AZURE_SSH_KEY
99+ export KUBE_SSH_KEY
91100 fi
92101 AZURE_SSH_PUBLIC_KEY_B64=$( base64 < " ${AZURE_SSH_PUBLIC_KEY_FILE} " | tr -d ' \r\n' )
93102 export AZURE_SSH_PUBLIC_KEY_B64
You can’t perform that action at this time.
0 commit comments