Progressive delivery and rollback
Separate synchronization from progressive delivery
Argo CD reconciles declared resources. Argo Rollouts is a separate controller with its own Rollout and analysis APIs; Flagger is another progressive delivery controller using its own Canary resource and compatible routing providers. Both require installation and appropriate permissions. A Kubernetes Deployment rolling update does not by itself provide metric-driven release decisions. Avoid competing controllers for one workload. The fixture is a static Rollout with a manual pause at each step and intentionally invalid registry; it does not create a real workload.
apiVersion: argoproj.io/v1alpha1kind: Rolloutmetadata: name: catalog namespace: catalog-stagingspec: replicas: 5 selector: matchLabels: app: catalog template: metadata: labels: app: catalog spec: containers: - name: catalog image: registry.example.invalid/catalog:v2 resources: requests: {cpu: 100m, memory: 64Mi} limits: {cpu: 200m, memory: 128Mi} strategy: canary: maxSurge: 1 maxUnavailable: 0 steps: - setWeight: 20 - pause: {} - setWeight: 40 - pause: {}Understand what a canary weight means
Without a traffic-routing integration, Argo Rollouts approximates setWeight through replica proportions. With a supported traffic manager it can control configured traffic weights independently of replica counts. Five equally selected replicas with one canary suggest 20 percent in an idealized model; long-lived connections and uneven routing can change observed request shares. With three replicas, exactly 20 percent is not representable by whole replicas. Measure actual per-version request counts and latency. A manual pause requires explicit promotion; it is not a successful analysis.
5 replicas: 1 canary / 5 = 20% replica share3 replicas: 1 canary / 3 ≈ 33.3% replica shareDefine evidence before shifting traffic
An AnalysisTemplate defines measurements; an AnalysisRun records an execution. Inline analysis can gate progression; background analysis can observe during rollout. Configure success, failure and inconclusive handling for the installed version. Our fictional policy requires at least 500 requests in each cohort, complete telemetry, canary errors no more than 1 percent and no more than 0.5 percentage points above stable, and canary p95 latency at most 250 ms. Missing data or a small sample means HOLD, not success. Failed thresholds mean ABORT. These are sample organizational rules, not built-in controller defaults.
Stable: 5 errors / 1000 = 0.5%Canary: 4 errors / 500 = 0.8%Canary p95: 180 msDifference: 0.3 percentage points -> PROMOTE if all other gates passRecover traffic and declared intent together
On a failed canary, stop progression and verify traffic returns to the stable version using the configured routing integration. Reconcile the reviewed Git desired revision so the failed artifact is not continuously requested; coordinate with the controller and verify status rather than assuming an abort modifies Git. A revert cannot reverse a destructive database migration or recover lost data. Prefer expand/contract changes that keep old and new binaries compatible; if compatibility is lost, stop and follow the approved recovery plan instead of blindly rolling back. Verify application requests, error rate and data invariants before closing the incident.
Abort -> verify stable traffic -> review Git revert -> sync approved revision -> verify application and dataPractice and next step
Read canary-cases.json and calculate error rates using request counts, not averages of percentages. Run validate_offline.py and compare decisions for missing telemetry, threshold failures and exact boundary values. Explain which steps would require a real traffic manager and analysis provider. Next: Amazon EKS architecture and compute modes.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Progressive delivery and rollback — knowledge check
Evaluate canary evidence, distinguish replica share from traffic share, and plan safe recovery.
With no traffic manager, what does setWeight approximate?
What should the sample policy do with missing telemetry?
Stable has 5 errors in 1000 requests; canary has 4 in 500. What is the difference?
Which resource records an execution of an Argo Rollouts analysis?
Why is aborting a rollout not enough to recover a destructive migration?