From f6a15745bdb28062c6e251c4395976bf00ca8fa3 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Thu, 22 Jan 2026 11:27:31 -0800 Subject: [PATCH] Add ArgoCD sync status to services check Shows app name, sync status, health, and revision (truncated to 7 chars) --- mise-tasks/indri-services-check | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mise-tasks/indri-services-check b/mise-tasks/indri-services-check index 1019bee..e7fc9a8 100755 --- a/mise-tasks/indri-services-check +++ b/mise-tasks/indri-services-check @@ -89,6 +89,22 @@ check_service "grafana" "kubectl --context=minikube-indri -n monitoring get pods check_service "miniflux" "kubectl --context=minikube-indri -n miniflux get pods -l app=miniflux -o jsonpath='{.items[0].status.phase}' | grep -q Running" check_service "blumeops-pg" "kubectl --context=minikube-indri -n databases get pods -l cnpg.io/cluster=blumeops-pg -o jsonpath='{.items[0].status.phase}' | grep -q Running" +echo "" +echo "ArgoCD app sync status:" +printf "%-20s %-12s %-12s %s\n" "NAME" "SYNC" "HEALTH" "REVISION" +while read -r name sync health rev; do + # Truncate revision to first 7 chars + short_rev="${rev:0:7}" + if [[ "$sync" == "Synced" ]]; then + printf "%-20s ${GREEN}%-12s${NC} %-12s %s\n" "$name" "$sync" "$health" "$short_rev" + elif [[ "$sync" == "OutOfSync" ]]; then + printf "%-20s ${RED}%-12s${NC} %-12s %s\n" "$name" "$sync" "$health" "$short_rev" + FAILED=1 + else + printf "%-20s %-12s %-12s %s\n" "$name" "$sync" "$health" "$short_rev" + fi +done < <(kubectl --context=minikube-indri get applications -n argocd --no-headers -o custom-columns='NAME:.metadata.name,SYNC:.status.sync.status,HEALTH:.status.health.status,REVISION:.status.sync.revision' 2>/dev/null) + echo "" if [ $FAILED -eq 0 ]; then echo -e "${GREEN}All services healthy!${NC}"