Skip to content

Commit

Permalink
Retry logic for k0s download process
Browse files Browse the repository at this point in the history
  • Loading branch information
makhov committed Dec 12, 2024
1 parent 752be58 commit 4a68f8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@

echo "Downloading k0s from URL: $k0sDownloadUrl"

curl -sSLf "$k0sDownloadUrl" >"$k0sInstallPath/$k0sBinary"
for _ in 1 2 3 4 5; do
curl -sSLf "$k0sDownloadUrl" >"$k0sInstallPath/$k0sBinary" && break || echo "Waiting 10 seconds before retry..." && sleep 10;
done

chmod 755 -- "$k0sInstallPath/$k0sBinary"

echo "k0s is now executable in $k0sInstallPath"
Expand Down

0 comments on commit 4a68f8a

Please sign in to comment.