PlatformEngr® Progressive delivery course

Cheat notes · Module 02 · Foundations

From Deployment to Rollout

A five-minute review for when you have done this module and want it back in your head. Open the full module for the steps and the lab, or the full text to print.

The idea

A Rollout replaces the Deployment with the same pod template, so the migration is a chart release: v2.0.0 renders a Rollout instead of a Deployment, and Argo CD prunes the old one. From then on, a new image tag in checkout-config starts a release that follows the Rollout's steps instead of replacing every pod.

Remember

  • Chart v2.0.0: templates/rollout.yaml replaces deployment.yaml; the HPA now targets kind: Rollout.
  • Default strategy: a canary of setWeight: 50 then pause: {}, which waits for a person.
  • Argo CD health: a paused Rollout is Suspended, an aborted one Degraded, a finished one Healthy.
  • Promote leaves a pause. Abort goes back to the stable version, but Git still asks for the new one.
  • After an abort, revert in Git. Until then the app stays Degraded, because Git and the cluster disagree on purpose.

Pitfalls

  • Leaving a Rollout aborted without a revert. Argo CD shows Degraded until Git matches what runs.
  • Reading setWeight: 50 with one replica as half the traffic. Without a traffic router the weight is a pod count.

Commands

kubectl argo rollouts get rollout checkout -n checkout-dev --watchSteps, ReplicaSets and status, live
kubectl argo rollouts promote checkout -n checkout-devLeave the current pause
kubectl argo rollouts abort checkout -n checkout-devBack to stable, release stopped
argocd app resources checkout-devRollout in, Deployment gone

checkout-app chart/values.yaml (v2.0.0)

strategy: canary
canary:
  steps:
    - setWeight: 50
    - pause: {}        # a person promotes
  analysis: {}
  trafficRouting: ""

Test yourself

Answer in your head first, then open the answer.

What does Argo CD show for a Rollout waiting at pause: {}?

Suspended health.

You aborted a release. What is left to do?

Revert the tag change in Git, so Git asks for the version that runs.

Without a traffic router, what does setWeight change?

The number of canary pods compared with stable ones.

Where module 02 leaves you: checkout runs as a Rollout in dev and prod from chart v2.0.0. Dev runs 6.8.0 with 2 pods; prod still runs 6.7.0. The Deployment is gone.