Skip to content

Commit

Permalink
Fix timeout error in olm install
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 16, 2024
1 parent 554a2e5 commit 86a0e4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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.25.0"
timeout=600
timeout_sec="600s"

echo "Install operator-lifecycle-manager $olm_version"

Expand All @@ -16,16 +16,16 @@ chmod +x /tmp/install.sh
/tmp/install.sh "$olm_version"

echo "Wait for operator-lifecycle-manager to be ready"
kubectl rollout status deployment/olm-operator --timeout="$timeout" -n olm
kubectl rollout status -n olm deployment/olm-operator --timeout_sec="$timeout_sec"

echo "Wait for operatorhubio-catalog pod to be ready"

# Sometime the first operatorhubio-catalog pod is failing
# and the 'kubectl wait' fails waiting for it
counter=0
max_retry=5
while ! kubectl wait -n olm pod --for=condition=Ready -l olm.catalogSource=operatorhubio-catalog --timeout="$timeout"
do
while ! kubectl wait -n olm pod --for=condition=Ready -l olm.catalogSource=operatorhubio-catalog --timeout_sec="$timeout_sec"
dos"
if [ $counter -eq $max_retry ]; then
break
fi
Expand Down

0 comments on commit 86a0e4e

Please sign in to comment.