mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Retry in get-kube.sh to avoid download flakes.
This commit is contained in:
parent
3bede2fb4c
commit
65cd30dbbe
@ -81,7 +81,7 @@ KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(be
|
|||||||
# KUBE_VERSION
|
# KUBE_VERSION
|
||||||
function set_binary_version() {
|
function set_binary_version() {
|
||||||
if [[ "${1}" =~ "/" ]]; then
|
if [[ "${1}" =~ "/" ]]; then
|
||||||
export KUBE_VERSION=$(curl -fsSL "https://dl.k8s.io/${1}.txt")
|
export KUBE_VERSION=$(curl -fsSL --retry 5 "https://dl.k8s.io/${1}.txt")
|
||||||
else
|
else
|
||||||
export KUBE_VERSION=${1}
|
export KUBE_VERSION=${1}
|
||||||
fi
|
fi
|
||||||
@ -227,7 +227,7 @@ fi
|
|||||||
|
|
||||||
if "${need_download}"; then
|
if "${need_download}"; then
|
||||||
if [[ $(which curl) ]]; then
|
if [[ $(which curl) ]]; then
|
||||||
curl -fL --retry 3 --keepalive-time 2 "${kubernetes_tar_url}" -o "${file}"
|
curl -fL --retry 5 --keepalive-time 2 "${kubernetes_tar_url}" -o "${file}"
|
||||||
elif [[ $(which wget) ]]; then
|
elif [[ $(which wget) ]]; then
|
||||||
wget "${kubernetes_tar_url}"
|
wget "${kubernetes_tar_url}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user