Skip to content

Commit

Permalink
wait longer and exit if apps are not synced and healthy at the end
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Kleinlercher <[email protected]>
  • Loading branch information
jkleinlercher committed May 3, 2024
1 parent 89ab440 commit 78c5dda
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install-k3d-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ kubectl apply -f https://raw.githubusercontent.com/suxess-it/sx-cnp-oss/main/boo


# max wait for 10 minutes
end=$((SECONDS+600))
end=$((SECONDS+1200))
argocd_apps="argocd sx-loki sx-kubecost sx-keycloak sx-promtail sx-tempo sx-crossplane sx-bootstrap-app sx-kargo approved-application-team-app sx-cert-manager sx-argo-rollouts sx-external-secrets sx-kyverno sx-kube-prometheus-stack"

all_apps_synced="true"
while [ $SECONDS -lt $end ]; do
all_apps_synced="true"
for app in ${argocd_apps} ; do
kubectl get application -n argocd ${app} | grep "Synced.*Healthy"
exit_code=$?
Expand All @@ -70,5 +70,9 @@ while [ $SECONDS -lt $end ]; do
kubectl get application -n argocd
sleep 10
done
if [ ${all_apps_synced} != "true" ] ; then
echo "not all apps synced and healthy after 1200 seconds"
exit 1
fi

echo "app 'sx-backstage' is not checked because there we need to manually apply secrets"

0 comments on commit 78c5dda

Please sign in to comment.