fix(argocd): terminate a sync operation after 7200 s #192
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/argocd-sync-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
On 2026-09-02 an automated sync of the Application
registryrolled a StatefulSet to an image that no node could pull. The operation stayed in phase Running for 34 minutes. Argo CD skips auto-sync while an operation is in progress, so the revert that Binjovi released 14 minutes later could not start until the hung operation ended.What
argocd-cmd-params-cm/controller.sync.timeout.seconds: "7200". The default0means never terminate. The Binjovi deployer (builder-imagesbinjovi-argocd-deployerv6, PR 170) terminates an older operation when a newer release starts to observe; this value is the backstop for a sync that no deployer watches.scripts/run-rebuild.sh(WAIT_FLUX_TIMEOUT_SECONDS). The registry Sync hook waits for Hydra for a long time by design; a shorter value can leave a fresh cluster without a registry until a human syncs.checksum/cmd-paramspod-template annotation onargocd-application-controllernow holds the sha256 of the ConfigMap data (compact JSON, sorted keys). This edit, and every later edit of that ConfigMap, changes the pod template and Flux rolls the controller in the same reconcile. No manual restart. Other components keep the Helm-frozen checksum; they read no key this repository edits.tests/argocd-sync-timeout.sh(wired intotests/check.sh) pins the value, its string type, the env wiring, and the checksum; it prints the checksum to pin after an edit. Red on a stale checksum and on a data edit without a bump; green as committed.Effect on rollout
One restart of
argocd-application-controller-0(single replica). In-flight syncs resume after the restart; Argo CD re-reconciles every Application once.Verify after deploy
kubectl -n argocd get sts argocd-application-controller -o jsonpath='{.spec.template.metadata.annotations.checksum/cmd-params}'=17e7b264…kubectl -n argocd exec argocd-application-controller-0 -- env | grep ARGOCD_APPLICATION_CONTROLLER_SYNC_TIMEOUT=7200https://claude.ai/code/session_01LeVatedQ4sCA1u6LHjo7B5