Skip to content

Commit

Permalink
Increase timeout management for olm install
Browse files Browse the repository at this point in the history
  • Loading branch information
fjammes committed Jun 7, 2024
1 parent ddc7d16 commit b604c66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/install-olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -euxo pipefail

olm_version="v0.28.0"
timeout_sec="600s"
timeout="60"

echo "Install operator-lifecycle-manager $olm_version"

Expand All @@ -24,10 +24,11 @@ echo "Wait for operatorhubio-catalog pod to be ready"
# and the 'kubectl wait' fails waiting for it, so a retry is needed
counter=0
max_retry=5
while ! kubectl wait -n olm pod --for=condition=Ready -l olm.catalogSource=operatorhubio-catalog --timeout="$timeout_sec"
while ! kubectl wait -n olm pod --for=condition=Ready -l olm.catalogSource=operatorhubio-catalog --timeout="${timeout}s"
do
if [ $counter -eq $max_retry ]; then
break
fi
counter=$((counter+1))
timeout=$((timeout+60))
done

0 comments on commit b604c66

Please sign in to comment.