Skip to content

Argo Workflows Daemon Quick Fix - Daemon Container Errors

DodaTech Updated 2026-06-26 1 min read

Argo Workflows daemon containers run long-lived services alongside workflow steps. Misconfigured daemons fail to start or block workflow completion. This guide covers the fix.

Quick Fix

Wrong

templates:
- name: with-daemon
  daemon:
    name: db-proxy
    image: postgres:15

The issue: missing lifecycle hooks, no readinessProbe, and no environment variables for the daemon. The database may not be ready when steps try to connect, and the daemon may not shut down properly.

templates:
- name: with-daemon
  daemon:
    name: db-proxy
    image: postgres:15-alpine
    env:
    - name: POSTGRES_PASSWORD
      value: temp-pw
    readinessProbe:
      exec:
        command: ["pg_isready"]
      initialDelaySeconds: 5
    lifecycle:
      preStop:
        exec:
          command: ["pg_ctl", "stop"]
# Expected output after applying the fix
# Daemon "db-proxy" starts and passes readiness probe
# Steps connect to postgres on localhost:5432
# Daemon terminates after all steps complete
# Workflow completes successfully

Prevention

  • Always add readinessProbe to daemon containers
  • Set environment variables required by the daemon image
  • Use lifecycle.preStop for graceful shutdown
  • Expose daemon ports for step containers to connect
  • Use lightweight images for daemon containers to reduce startup time

DodaTech Tools

Doda Browser's daemon manager shows daemon status, logs, and health checks. DodaZIP archives daemon configurations. Durga Antivirus Pro scans daemon images for vulnerabilities.

FAQ

How does Argo manage daemon container lifecycle?

Daemon starts before workflow steps and is terminated after all steps complete. The daemon runs in the same pod as the steps, sharing network namespace. ||| Can I have multiple daemons in one workflow? Yes, each template can have one daemon. Use multiple templates with daemons and chain them together for multi-daemon workflows. ||| How do I access a daemon from another template? Daemon exposes services on localhost within its template's pod. Use artifact passing or shared volumes to pass connection information to other templates.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro