From 56eb00f53712f0a3d0de72ad48719003dbccf19c Mon Sep 17 00:00:00 2001 From: PatrickLaabs Date: Sat, 14 Jun 2025 12:15:23 +0200 Subject: [PATCH] adding a retry mechanism, if the first attempt of curling the kind binary fails. checks after successfully download of the binary itself, addded verify_gopath_bin and chmod command back into the script switching to curls retry implementation using curls retry mechanism to retry on failure --- hack/ensure-kind.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ensure-kind.sh b/hack/ensure-kind.sh index 603f9e05387e..1c954078f74a 100755 --- a/hack/ensure-kind.sh +++ b/hack/ensure-kind.sh @@ -43,7 +43,7 @@ verify_kind_version() { if ! [ -d "${GOPATH_BIN}" ]; then mkdir -p "${GOPATH_BIN}" fi - curl -sLo "${GOPATH_BIN}/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${MINIMUM_KIND_VERSION}/kind-${goos}-${goarch}" + curl --retry 5 --retry-all-errors -sLo "${GOPATH_BIN}/kind" "https://github.com/kubernetes-sigs/kind/releases/download/${MINIMUM_KIND_VERSION}/kind-${goos}-${goarch}" chmod +x "${GOPATH_BIN}/kind" verify_gopath_bin else