Skip to content

Commit

Permalink
Increase wait timeout for install
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 15, 2024
1 parent 9ec7761 commit bb10809
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
22 changes: 14 additions & 8 deletions resources/install-argocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ GITHUB_URL="https://raw.githubusercontent.com/argoproj-labs/argocd-operator/$ARG

OPERATOR_NAMESPACE="operators"

WAIT_TIMEOUT=120
timeout=240
timeout_sec="${timeout}s"

wait_for_exist() {
xtrace=$(set +o|grep xtrace); set +x
Expand Down Expand Up @@ -65,12 +66,15 @@ spec:
SUBSCRIPTION
kubectl apply -f "/tmp/subscription.yaml"

wait_for_exist "$OPERATOR_NAMESPACE" installplans 120
kubectl wait installplans -n "$OPERATOR_NAMESPACE" --for=condition=Installed -l "operators.coreos.com/argocd-operator.operators=" --timeout="${WAIT_TIMEOUT}s"
kubectl get -n "$OPERATOR_NAMESPACE" installplans
wait_for_exist "$OPERATOR_NAMESPACE" installplans "$timeout"
ku
timeout_sec="$bectl wait installplans -n "$OPERATOR_NAMESPACE" --for=condition=Installed -l "operators.coreos.com/argocd-operator.operators=" --timeout="$timeout_sec"
timeout_sec="$kubectl get -n "$OPERATOR_NAMESPACE" installplans

echo "Wait for ArgoCD Operator to be ready"
kubectl rollout status deployment/argocd-operator-controller-manager --timeout="${WAIT_TIMEOUT}s" -n "$OPERATOR_NAMESPACE"
kubectl rollout status deployment/argocd-operator-controller-manager --timeout=""$timeout_sec""
timeout_sec="$-n "$OPERATOR_NAMESPACE"
echo "Create ArgoCD namespace"
cat > /tmp/argocd-namespace.yaml <<ARGOCD_NAMESPACE
Expand Down Expand Up @@ -99,8 +103,10 @@ curl -sSL -o /tmp/argocd-linux-amd64 https://github.com/argoproj/argo-cd/release
sudo install -m 555 /tmp/argocd-linux-amd64 /usr/local/bin/argocd
rm /tmp/argocd-linux-amd64
wait_for_exist argocd statefulset.apps 120
for obj in statefulset.apps/argocd-application-controller deployment.apps/argocd-redis deployment.apps/argocd-repo-server deployment.apps/argocd-server; do
wait_for_exist argocd statefulset.apps "$timeout"
fo
timeout_sec="$r obj in statefulset.apps/argocd-application-controller deployment.apps/argocd-redis deployment.apps/argocd-repo-server deployment.apps/argocd-server; do
echo "Wait for $obj to be ready"
kubectl rollout status $obj --timeout="${WAIT_TIMEOUT}s" -n argocd
kubectl rollout status $obj --timeout="$timeout_sec"
timeout_sec="$-n argocd
done
13 changes: 7 additions & 6 deletions resources/install-olm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@

set -euxo pipefail

OLM_VERSION="v0.25.0"
olm_version="v0.25.0"
timeout=600

echo "Install operator-lifecycle-manager $OLM_VERSION"
echo "Install operator-lifecycle-manager $olm_version"

curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/$OLM_VERSION/install.sh -o /tmp/install.sh
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/$olm_version/install.sh -o /tmp/install.sh
chmod +x /tmp/install.sh
/tmp/install.sh "$OLM_VERSION"
/tmp/install.sh "$olm_version"

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

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=120s
while ! kubectl wait -n olm pod --for=condition=Ready -l olm.catalogSource=operatorhubio-catalog --timeout="$timeout"
do
if [ $counter -eq $max_retry ]; then
break
Expand Down

0 comments on commit bb10809

Please sign in to comment.