Skip to content

Commit fe2c308

Browse files
feat(liveness): set curl timeout (#23)
helps to fit in liveness probe total timeout
1 parent fd7fb6b commit fe2c308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

liveliness.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ read -r -a repos <<< "$LIVELINESS_REPOS"
77
for i in "${repos[@]}"
88
do
99
echo "repo $i liveliness check..."
10-
response=$(curl --head -L -w '%{http_code}' -o /dev/null -s -k -x http://127.0.0.1:3128 "$i")
10+
response=$(curl --head -L -w '%{http_code}' -o /dev/null -s -k -x http://127.0.0.1:3128 "$i" --max-timeout "${CURL_TIMEOUT:-2}")
1111
if [[ "$response" -lt "200" ]] || [[ "$response" -ge "400" ]]; then
1212
echo "failed curl for repo $i with response $response" >&2
1313
exit 1

0 commit comments

Comments
 (0)