Azure 47: Environment Rollout Strategies — dev=direct, uat=optional canary, prod=canary+promote
easy⏱ 5 mincourseazure
Three strategies, one chart
The universal chart's _helpers.tpl picks the step list based on .Values.envName and .Values.mesh.canary.requiresApproval. dev: [{ setWeight: 100 }] (effectively a Deployment). uat: [{ setWeight: 25 }, { pause: { duration: '2m' } }, { setWeight: 100 }]. prod: [{ setWeight: 10 }, { pause: {} }, { setWeight: 50 }, { pause: {} }, { setWeight: 100 }] with manual pauses.
Pause modes are the safety lever
A pause: {} (no duration) holds until something promotes it — either an engineer with kubectl argo rollouts promote, or a downstream stage in the pipeline (pipeline-templates/cd/jobs/promote-rollout-v2.yaml). A pause: { duration: '5m' } simply waits. Prod uses no-duration pauses so a human always signs off; uat uses duration pauses so it auto-bakes overnight.
Wiring it into the pipeline
After helm upgrade the pipeline waits on rollout state. helm-rollout-v2.yaml takes isCanary: bool; if true it kubectl wait for the Rollout to reach Paused, then optionally chains into promote-rollout-v2.yaml. Dev never goes through this — helm-deploy-v2.yaml is enough.
Build the strategy resolver
Write resolveStrategy(env) returning an array of steps shaped like RolloutStep from lesson 46. dev: [{ setWeight: 100 }]. uat: [{ setWeight: 25 }, { pause: { duration: '2m' } }, { setWeight: 100 }]. prod: [{ setWeight: 10 }, { pause: {} }, { setWeight: 50 }, { pause: {} }, { setWeight: 100 }]. Throw for unknown envs. Log each strategy and count the number of human approvals each requires.
Tag your manual-pause steps with metadata
Argo's experimentMetadata lets you attach a slack-channel and approver group to each pause. On-call sees 'odyssey-api paused at 10% canary, approver: #shop-team' in their dashboard instead of having to dig in the YAML. Tiny ergonomic win, huge on-call quality-of-life.
Quiz: why no canary in dev?
Two reasons: developers iterate fast and a canary pause is a tax on iteration; and dev traffic is so low that canary analyses (latency/error rate) have no statistical power. Save your safety budget for environments where it pays off.