Runbook: ArgoCD App Out of Sync
Two alerts share this runbook, split on the autosync_enabled label of the
argocd_app_info metric:
ArgoCDAppOutOfSync(severitywarning,for: 5m) — every app that is not explicitly manual (autosync_enabled!="false"), so an app missing the label (or any future value) fails toward alerting. OutOfSync after 5 minutes is a real failure: a failed sync, a comparison error, or a hand edit. Treat it as an incident.ArgoCDManualAppPendingSync(severityinfo,for: 24h) — the four by-design manual apps (apps,argocd,cloudnative-pg-ringtail,external-secrets-crds-ringtail). OutOfSync here is not drift; it is a reviewed change waiting on a human sync. It fires only after a day, so it is a to-do, not an incident.
Diagnostic Steps
-
Check which app is out of sync — the
namelabel in the alert tells you:argocd app get <app-name> -
View the diff:
argocd app diff <app-name> -
Check if it’s a branch revision issue — during branch work, apps may be pointed at a feature branch. After merge, they need to be reset to main:
argocd app get <app-name> -o json | python3 -c "import json,sys; print(json.load(sys.stdin)['spec']['source']['targetRevision'])" -
Check ArgoCD UI — https://argocd.ops.eblu.me — look for sync errors or degraded status.
Resolution
ArgoCDManualAppPendingSync (manual app, pending human sync)
The diff is a reviewed merge that is simply not synced yet. Approve the
argocd-sync-apps/argocd-deploy warrant in Horkos, or sync it yourself
([human] — the agent argocd CLI is read-only):
argocd app sync <app-name>If the diff is not a reviewed change (unexpected, or older than a day without an explanation), treat it as drift and diagnose below.
ArgoCDAppOutOfSync (auto-sync app, real failure)
# Simple sync
argocd app sync <app-name>
# If pruning is needed
argocd app sync <app-name> --prune
# If stuck on a deleted branch
argocd app set <app-name> --revision main
argocd app sync <app-name>Common Causes (auto-sync apps)
- Kustomize/manifest error — invalid YAML or unsatisfiable resource requirements
- Pruning needed — old ConfigMaps from
configMapGeneratorneed pruning - Branch revision not reset after PR merge — app still points at a deleted branch
appsOutOfSync with asyncPolicy.automatedfield diff — an Application manifest spells the defaults (prune: false/selfHeal: false); the controller strips explicit-false fields (Goomitempty) on every automated sync, soappsdiffs forever. Fix the manifest toautomated: {}(see argocd > Sync Policy);argocd app diff appsshows which app. Always record the diff before syncingapps.
The autosync_enabled label
autosync_enabled is a native label on the argocd_app_info metric (ArgoCD
core metrics, scraped by the argocd Prometheus job), derived from each
Application’s spec.syncPolicy.automated. Both rules partition on it.
Verified present on every series 2026-10-13 (count by (name, autosync_enabled) (argocd_app_info) showed all apps labelled, the four
manual ones false).
Silencing
During active branch development, apps may intentionally be out of sync:
- Grafana → Alerting → Silences → Create Silence
- Match
alertname(ArgoCDAppOutOfSyncorArgoCDManualAppPendingSync) andname = <app-name>
Related
- argocd — ArgoCD reference
- deploy-infra-alerting — Alerting pipeline overview