mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 17:34:21 +00:00
add curl timeout to install script
This is important to improve reliency of other automations/scripts that are using this script internally. Otherwise install script might stall forever in some cases.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#
|
||||
# Fails if the file already exists.
|
||||
|
||||
curl_timeout=600
|
||||
release_url=https://api.github.com/repos/kubernetes-sigs/kustomize/releases
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
@@ -45,11 +46,11 @@ elif [[ "$OSTYPE" == darwin* ]]; then
|
||||
opsys=darwin
|
||||
fi
|
||||
|
||||
curl -s $release_url |\
|
||||
curl -m $curl_timeout -s $release_url |\
|
||||
grep browser_download.*${opsys}_${arch} |\
|
||||
cut -d '"' -f 4 |\
|
||||
sort | tail -n 1 |\
|
||||
xargs curl -sLO
|
||||
xargs curl -m $curl_timeout -sLO
|
||||
|
||||
if [ -e ./kustomize_v*_${opsys}_amd64.tar.gz ]; then
|
||||
tar xzf ./kustomize_v*_${opsys}_amd64.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user