NGINX Ingress Helm Chart Install/Upgrade Sync Stuck with Argo CD

NGINX Ingress Helm Chart Install/Upgrade Sync Stuck with Argo CD

đź§© Problem Overview

  • Context: Using Argo CD to manage ingress-nginx Helm chart.

  • Issue Introduced: In chart version 4.12.3+, pre-sync and post-sync Jobs have ttlSecondsAfterFinished: 0, meaning the Job itself is deleted immediately after completion.

  • Symptom: Argo CD sync remains stuck in Pending or Waiting—Jobs finish, Kubernetes garbage‑collects them immediately, but Argo CD can't track completion and retries indefinitely.


🔍 Root Cause

The chart’s hardcoding leads to:

  1. Job runs and completes.

  2. ttlSecondsAfterFinished: 0 triggers deletion of the Job object.

  3. Argo CD sees the Job’s absence on the cluster → marks it OutOfSync, re-creates it → loop.
    Similar behavior confirmed in community answers: Argo CD re-syncs Jobs removed due to ttlSecondsAfterFinished.


âś… Workarounds

🟢 1. Use Chart Version 4.12.2 + Patch

  • Deploy ingress-nginx v4.12.2 to bypass ttl issue.

  • Still use the latest container image by patching image tag & digest via values.yaml:

    controller:
      image:
        tag: <latest-tag>
        digest: <latest-digest>
    
  • This avoids introducing ttl bug while benefiting from newest controller releases.

🛠️ Step-by-Step Troubleshooting

  1. Confirm Chart Version & Behavior

    • Deploy v4.12.3+ with Argo CD → observe Jobs disappear quickly, sync never completes.

    • kubectl get jobs after sync stuck.

  2. Validate Argo CD Logs

    • argocd-server logs indicate re-application of the Job resource.

  3. Implement Fix

    • Pin chart to 4.12.2 + patch image.

  4. Test and Confirm

    • Trigger Re-sync on ArgoCD UI. It should complete without stuck Jobs.
    • Validate no lingering Jobs and Application health is green.

  5. Monitor Upstream Changes

    • Once ttlSecondsAfterFinished is made configurable and published, re-adopt latest chart version and remove patch.


📌 Sample Patch via Helm values.yaml

controller:
  image:
    tag: "v1.8.1" # or current latest
    digest: "sha256:<digest>"

Ensure chart dependency still references 4.12.2 in Chart.yaml.


🎯 Key Takeaways

Hardcoded ttl of 0 in chart v4.12.3 causes Job disappearance→Argo CD loops.
Pinning to v4.12.2 + image patch avoids the bug.
Keep an eye on upstream chart changes for permanent fix.