Skip to content

Validation & Rollout

FieldValue
TypeAgent Reference
Source~/.copilot/agents/_refs/platform-sre-kubernetes/validation-and-rollout.md
DescriptionNot specified

Source Content

Validation & Rollout

Three phases: pre-deploy validation, controlled rollout, post-deploy verification. No phase is skipped, even for “trivial” changes.

Pre-deploy validation

Run locally and in CI before merge.

CheckCommandPass criterion
Helm syntaxhelm lint .p3/helmexit 0, no warnings
Template renderhelm template <r> .p3/helm -f .p3/helm/values/values.<env>.yamlno errors, output matches expected diff
Schema validationhelm template ... | kubeconform -strict -summaryall resources known & valid
Server-side dry-runkubectl apply --dry-run=server -f - (piped from template)no admission errors
Policy checkkyverno apply <policy-dir> --resource <(helm template ...)all policies pass
Image signaturecosign verify --certificate-identity ... <image>signed by expected workflow
Diff vs clusterargocd app diff <app>only the intended drift

CI runs all of these as required checks; merge to main is blocked otherwise.

Rollout — environments in order

test → staging → prod

Promotion = a PR that bumps image.tag (or targetRevision) in the next env’s values file. Skip-promotion is a process violation; use a hotfix-<env> branch if a fix needs to land out-of-band.

Sync mode

EnvArgoCD syncNotes
testauto, self-heal, pruneephemeral, can be torn down
stagingauto, self-heal~prod parity, soak before prod
prodmanual or auto pinned to tagsync gated by release PR

Rollout watch

Once synced:

Terminal window
kubectl -n <ns> rollout status deploy/<svc> --timeout=5m
kubectl -n <ns> get pods -l app.kubernetes.io/name=<svc> -w
kubectl -n <ns> get events --sort-by=.lastTimestamp | tail -30

Healthy = all pods Ready 1/1, no CrashLoopBackOff, no OOMKilled in the last 10 minutes.

Post-deploy verification (≥ 15 minutes)

Watch four signals against the SLO baseline:

SignalExpectedWhere
HTTP error ratewithin 1σ of pre-deployGrafana service dashboard
p99 latencywithin 1σ of pre-deploysame dashboard
Pod restarts0 since rollout completionkubectl get pods
Saturation (CPU/mem)< 70% of limitsGrafana / kubectl top

If any signal regresses meaningfully, roll back first, investigate after.

Smoke test

A Job template alongside the chart runs a minimal end-to-end check post-sync:

apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "<chart>.fullname" . }}-smoke
annotations:
"argocd.argoproj.io/hook": PostSync
"argocd.argoproj.io/hook-delete-policy": HookSucceeded
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: smoke
image: curlimages/curl:8.10.1
command: ["sh","-c"]
args: ["curl -fsS http://{{ include \"<chart>.fullname\" . }}/healthz && curl -fsS http://{{ include \"<chart>.fullname\" . }}/readyz"]

ArgoCD reports the Application as Progressing until the Job succeeds — a failure surfaces in the UI without manual log-spelunking.

Required output for every change

The agent always produces:

  1. Plan — scope, risk, blast radius, prerequisites.
  2. Changes — manifests / templates / values / docs touched.
  3. Validation — commands above, with expected pass criteria.
  4. Rollout procedure — step-by-step, including who approves each gate.
  5. Rollback procedure — see rollback.md.
  6. Observability checks — dashboard links, alert IDs, log queries.