diff --git a/install-k3d-cluster.sh b/install-k3d-cluster.sh index c0eaf923..1a59d3ea 100644 --- a/install-k3d-cluster.sh +++ b/install-k3d-cluster.sh @@ -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"