Skip to content

Argo Workflows Shutdown Quick Fix - Graceful Shutdown Config

DodaTech Updated 2026-06-26 1 min read

Argo Workflows shutdown configuration controls how workflow pods terminate. Incorrect shutdown settings cause data loss or incomplete cleanup. This guide covers the fix.

Quick Fix

Wrong

spec:
  shutdown: Terminate

The Terminate shutdown Strategy immediately kills running steps without grace period. In-progress operations may be interrupted and artifacts may be corrupted.

spec:
  shutdown: Stop
  shutdownDelay: 30s
  ttlStrategy:
    secondsAfterCompletion: 3600
    secondsAfterSuccess: 86400
    secondsAfterFailure: 604800
# Expected output after applying the fix
# Shutdown strategy: Stop (no new steps, active ones complete)
# Shutdown delay: 30s grace period
# Workflow resources retained: 1h after completion
# Successful runs: 24h retention, Failed runs: 7d retention

Prevention

  • Use Stop instead of Terminate for graceful shutdown
  • Set shutdownDelay for cleanup operations
  • Configure ttlStrategy for resource retention policies
  • Implement pre-stop hooks in containers for cleanup
  • Use argo terminate <workflow> for emergency shutdown

DodaTech Tools

Doda Browser's shutdown manager controls workflow termination with safety checks. DodaZIP archives shutdown logs for post-mortem analysis. Durga Antivirus Pro monitors shutdown events for anomalies.

FAQ

What is the difference between Stop and Terminate shutdown?

Stop prevents new steps from starting but lets running steps finish. Terminate immediately kills all running steps and cancels pending ones. ||| How do TTL strategies affect workflow cleanup? TTL strategies automatically delete workflow resources after the specified duration. Set different TTLs for success and failure to retain failed workflow logs longer. ||| Can I customize the shutdown sequence? Use lifecycle.preStop hooks in containers and shutdownDelay in workflow spec. Write cleanup logic in a dedicated sidecar or final step.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro