Log icon
ForEach icon
Status icon
If icon
Switch icon
Sync icon
Pause icon
Fail icon
Sequential icon
Assert icon
Return icon

Single-tenant Argo CD rollout with waves, guarded sync strategy, and Status-based readiness gates

Roll out Argo CD apps in controlled waves for single-tenant fleets with Status-based readiness gates, explicit auto-sync handling, and fail-fast diagnostics.

Categories
CoreInfrastructure

Deploy Argo CD Application updates across a large single-tenant fleet (where one tenant can own hundreds of GitOps applications) without flooding your cluster all at once. This blueprint orchestrates a progressive, wave-by-wave Argo CD rollout with bounded parallelism, explicit handling for auto-sync-disabled apps, and readiness gates driven by Argo CD's own Status API rather than fragile HTTP probes. It solves the classic GitOps blast-radius problem: how to push changes safely, stop on the first non-converging application, and keep a clear audit trail per tenant.

How it works

  • rollout_start (io.kestra.plugin.core.log.Log) records the tenant and rollout parameters for traceability.
  • rollout_by_wave (io.kestra.plugin.core.flow.ForEach with concurrencyLimit: 1) iterates the ordered application_waves plan sequentially to enforce blast-radius control.
  • rollout_applications_in_wave (a nested io.kestra.plugin.core.flow.ForEach) deploys the apps within a wave in parallel with a concurrency cap.
  • status_before (io.kestra.plugin.argocd.apps.Status) fetches a baseline; handle_auto_sync_disabled (io.kestra.plugin.core.flow.If) detects when spec.syncPolicy.automated is null and routes through a io.kestra.plugin.core.flow.Switch on auto_sync_disabled_strategy.
  • For auto-sync-enabled apps, an optional io.kestra.plugin.argocd.apps.Sync runs only when sync_when_auto_sync_enabled is true.
  • wait_until_synced_and_healthy (io.kestra.plugin.core.flow.Sequential with retry) polls Status and uses io.kestra.plugin.core.execution.Assert to gate on sync.status == 'Synced' and Healthy health.
  • status_after, log_status_after, and emit_app_summary (io.kestra.plugin.core.debug.Return) capture final state and a JSON summary per app.

What you get

  • Sequential waves with parallel, capped deployment inside each wave.
  • Four explicit strategies for auto-sync-disabled apps: force_sync, manual_approval, fail_rollout, skip_application.
  • Status-based readiness gates that fail fast on non-converging applications.
  • Structured [PRE], [PROBE], [POST] logs plus a machine-readable per-app summary.

Who it's for

  • Platform and SRE teams running single-tenant GitOps fleets on Argo CD.
  • DevOps engineers who need controlled, auditable production rollouts.

Why orchestrate this with Kestra

Argo CD reconciles each application independently and has no concept of ordered waves, cross-application gating, or human approval mid-rollout. Kestra adds that control plane on top: declarative YAML waves, event triggers and scheduling, automatic retries on the readiness Sequential, a Pause task for manual approval, full execution lineage, and fail-fast stop conditions across the whole fleet. You keep Argo CD as the GitOps engine while Kestra owns sequencing, gating, and observability the Argo CD scheduler cannot provide.

Prerequisites

  • A reachable Argo CD API server and existing Application objects named in application_waves.

Secrets

  • ARGOCD_SERVER: Argo CD API endpoint (for example https://argocd.example.com).
  • ARGOCD_TOKEN: API token with rights to read status and sync applications.

Quick start

  1. Add the ARGOCD_SERVER and ARGOCD_TOKEN secrets to your namespace.
  2. Set tenant_id and edit application_waves to match your real Argo CD Application names.
  3. Choose an auto_sync_disabled_strategy and decide whether sync_when_auto_sync_enabled should force manual syncs.
  4. Execute the flow and watch the [PRE]/[PROBE]/[POST] logs converge wave by wave.

How to extend

  • Add a io.kestra.plugin.core.flow.Subflow or notification task after wave_done to post rollout summaries to Slack or an incident channel.
  • Wire a Git or webhook trigger so a merge to your config repo kicks off the rollout automatically.
  • Tune readiness_poll_interval, readiness_max_attempts, and allow_degraded_health per environment for stricter or more lenient gates.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.