Skip to content

Commit

Permalink
add more logs and daemon reload
Browse files Browse the repository at this point in the history
  • Loading branch information
warroyo committed Aug 27, 2020
1 parent 108d53f commit 614cee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ function run()
loginfo "ip: ${ip}"

#get the secret for the machine and create a file
loginfo "getting ssh key for ${cluster}"
kubectl get secret ${cluster}-ssh -n ${ns} -o jsonpath="{.data.ssh-privatekey}" | base64 -d > /tmp/sshkey.pem
chmod 400 /tmp/sshkey.pem


loginfo "attempting ssh to ${ip}"
ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /tmp/sshkey.pem vmware-system-user@${ip} << EOF
sudo -i
whoami
Expand All @@ -58,6 +59,7 @@ function run()
echo 'HTTPS_PROXY="'${TKC_HTTPS_PROXY}'"' >> /etc/sysconfig/proxy
echo 'NO_PROXY="'${TKC_NO_PROXY}'"' >> /etc/sysconfig/proxy
systemctl daemon-reload
systemctl restart containerd
else
Expand Down

0 comments on commit 614cee2

Please sign in to comment.