Skip to content

Commit

Permalink
add check loop if all apps are up and running - especially needed for…
Browse files Browse the repository at this point in the history
… github action

Signed-off-by: Johannes Kleinlercher <[email protected]>
  • Loading branch information
jkleinlercher committed May 3, 2024
1 parent fba4dc3 commit f7e19d8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions install-k3d-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,25 @@ kubectl apply -f https://raw.githubusercontent.com/suxess-it/sx-cnp-oss/main/boo



# max wait for 10 minutes
end=$((SECONDS+600))
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"

while [ $SECONDS -lt $end ]; do
kubectl get application -n argocd
all_apps_synced="true"
for app in ${argocd_apps} ; do
kubectl get application -n argocd ${app} | grep "Synced.*Healthy"
exit_code=$?
if [[ $exit_code -ne 0 ]]; then
all_apps_synced="false"
fi
done
if [ ${all_apps_synced} = "true" ] ; then
echo "all apps are synced! you are ready to take off!"
break
fi
sleep 10
done

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

0 comments on commit f7e19d8

Please sign in to comment.