Interview Prep/GitOps & Argo CD/Progressive Delivery, Image Updater & Notifications

How do you migrate an existing Deployment to a Rollout with no downtime?

AdvancedConceptProgressive Delivery, Image Updater & Notifications
Answer

Use workloadRef so the Rollout references the existing Deployment's pod template instead of copying it:

spec:
  replicas: 5
  workloadRef:
    apiVersion: apps/v1
    kind: Deployment
    name: web
    scaleDown: progressively   # or onsuccess / never

Rollouts creates its own ReplicaSet from the template and scales the Deployment down as Rollout pods become ready. Once complete, remove the Deployment or keep it at zero replicas, and set the Deployment's replicas out of Argo CD's control to avoid a fight.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Progressive Delivery, Image Updater & Notifications