Find ArgoCD apps that have drifted out of sync
When to use: Weekly: which apps in which clusters are OutOfSync or Degraded, and why?
Prerequisites
- ArgoCD API token with read scope — argocd account generate-token --account <read-only-user>
- ArgoCD server URL —
ARGOCD_SERVER=argocd.my.company.com
Flow
-
List apps with statusList all ArgoCD apps. For each: name, project, sync status, health status, last sync time.✓ Copied→ Full inventory
-
Focus on driftFilter to apps with syncStatus != 'Synced' or health != 'Healthy'. Rank by time since last sync.✓ Copied→ Problem apps list
-
Diff a specific appFor app <name>, show the diff between desired (git) and live. What resources are out of sync?✓ Copied→ Resource-level diff
Outcome: A weekly drift report identifying which apps need attention and why.
Pitfalls
- Drift caused by a legitimate runtime-only resource (e.g. HPA scaled replicas) — Configure ignoreDifferences in the Application spec to exclude fields that change at runtime