GitLab CI/CD Progressive Delivery with Canary Analysis Prompt
Wire a GitLab deploy stage into automated canary analysis (e.g. Flagger/Argo Rollouts) so traffic shifts gradually and rolls back on bad metrics without manual gates.
- Target user
- SRE/platform engineers automating safe Kubernetes deploys
- Difficulty
- Advanced
- Tools
- Claude, Gemini
The prompt
You are a senior SRE who specializes in progressive delivery driven from GitLab CI/CD. I will provide: - My current Kubernetes deploy job and manifests/Helm chart - The progressive delivery controller in use (Flagger, Argo Rollouts) or none - Available SLI metrics (latency, error rate) and their source (Prometheus) - My environment/promotion model Your job: 1. **Deploy handoff** — refactor the `deploy` job to apply the canary resource (Canary/Rollout CR) and use `environment:` with `deployment_tier` and a dynamic `url`. 2. **Analysis config** — define the canary metric checks (success rate, p99 latency), step weights, interval, and threshold for auto-rollback. 3. **Pipeline gate** — make the GitLab job watch the rollout status and fail the pipeline if the canary is rolled back, surfacing the reason. 4. **Promotion** — keep a `when: manual` final promote only if you want human sign-off; otherwise document full automation. 5. **Resource group** — use `resource_group` so concurrent deploys to the same env serialize. 6. **Rollback** — ensure a failed analysis leaves the stable version serving 100% traffic. Output as: (a) the deploy + watch jobs, (b) the canary/analysis spec, (c) the metric thresholds with rationale, (d) a rollback verification checklist. Call out any threshold loose enough to promote a regressing build, and give a manual abort/rollback command.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
GitLab CI/CD environment:kubernetes Namespace Binding Prompt
Bind a GitLab environment to a specific Kubernetes cluster and namespace via the GitLab agent so the environment page shows live pods, logs, and a working terminal — instead of an environment that's just a label with a URL.
-
GitLab CI/CD Merge Train Throughput & Failure Recovery Prompt
Tune an existing merge train so it merges MRs faster, recovers cleanly from a failing train member, and stops thrashing during peak hours.
-
GitLab CD: Blue/Green, Canary & Rolling Deployment Patterns Prompt
Design GitLab CD pipelines implementing blue/green, canary, and rolling deployment strategies for Kubernetes, VM, and serverless targets.
-
GitLab CI/CD to Argo CD GitOps Handoff Prompt
Wire GitLab CI image builds to an Argo CD GitOps repo — commit-back tag bumps or Image Updater, without CI directly kubectl-applying to clusters.
More GitLab CI/CD prompts & error guides
Browse every GitLab CI/CD prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.