Skip to content

docs(infra): record D-BLUEGREEN, and correct the kubectl-scale claim it was built around - #607

Merged
athvin merged 1 commit into
mainfrom
bm/bluegreen-p15-decision-record
Nov 5, 2026
Merged

athvin merged 1 commit into
mainfrom
bm/bluegreen-p15-decision-record

Conversation

@athvin

@athvin athvin commented Nov 5, 2026

Copy link
Copy Markdown
Owner

The blue/green stack shipped without its decision record. This adds it, revises the two places that still described the old deploy as current state, and corrects a false claim the design had been built around.

D-BLUEGREEN

The part worth having on the record is why neither existing Argo rejection answers this question. D-ARGO rejects Argo Workflows because the DAG is inside the process; D-DEPLOY notes Argo CD is out of scope as a question about who applies manifests. Argo Rollouts is a third product answering a third question, and "we said no to Argo" is the obvious and wrong way to short-circuit it.

What settled it: a controller's marginal value here is percentage canaries, and those need a traffic provider. ingress.enabled: false and §4.1's edge is unbuilt, so without one, Rollouts' blueGreen strategy swaps a Service selector — which is what the chart already does, in exchange for a CRD, a controller to run and upgrade, and a second owner of the Service object.

The entry also records the two reasons it was worth doing before the ALB (the control_plane_unreachable path meant a slow deploy could fail a running hour-long task, charged to the launch budget; and the reconciler's Ahead verdict plus E011 had already built the expand half), the refuse-breaking-outright decision, and the deferred ALB weighted-target-group follow-on with the _next/static residual risk it addresses.

§14.2

It still described a deploy that no longer exists — one replica under Recreate, with an init container migrating between the old pod's deletion and the new pod's boot.

The false claim, which is why the Makefile is in this diff

dev-resume's comment states that helm's three-way merge "sees no manifest diff after a kubectl scale, so it would leave the replica counts at zero".

If that held, the deploy's third phase would be unsound, because it retires a colour with exactly that kubectl scale. The next release renders a manifest identical to the last one, so an unrestored count would leave the target colour at zero — and nothing on the happy path would notice: --atomic --wait and kubectl rollout status both pass trivially for a 0-replica Deployment, which is vacuously rolled out. Only the preview smoke test would fail, and it would fail as a connection error rather than as "the colour never scaled up".

Measured on kind against helm 3.17 rather than reasoned about:

step spec.replicas
after helm upgrade --install --set replicas=1 1
after kubectl scale --replicas=0 0
after helm upgrade --set replicas=1 (manifest unchanged) 1

That is Helm 3 patching the live object against the rendered manifest rather than against the previous one; the comment captures Helm 2 behaviour. So the retirement is sound as written. The comment is corrected here, and dev-resume keeps kubectl for the reason that does hold — a helm upgrade --wait would re-run the release's hooks, including the schema migrate, just to put a replica count back.

Verification

make skills-check passes; the Makefile still parses. Docs and one comment only — no behaviour change.

🤖 Generated with Claude Code

…it was built around

The blue/green stack shipped without its decision record. This adds it, and
revises the two places that still described the old deploy as current state.

- `D-BLUEGREEN` in infrastructure-decisions.md. The part worth having on the
  record is why neither existing Argo rejection answers this question:
  `D-ARGO` rejects Argo *Workflows* because the DAG is inside the process, and
  `D-DEPLOY` notes Argo *CD* is out of scope as a question about who applies
  manifests. Argo **Rollouts** is a third product answering a third question,
  and "we said no to Argo" is the obvious and wrong way to short-circuit it.
  What settled it is that a controller's marginal value here is percentage
  canaries, and those need a traffic provider: `ingress.enabled: false`, so
  without one its blueGreen strategy swaps a Service selector, which is what
  forty lines of chart already do.

- §14.2's Helm paragraph in infrastructure.md described a deploy that no longer
  exists — one replica under `Recreate` with an init container migrating
  between the old pod's deletion and the new pod's boot.

One claim this was built around turns out to be false, which is the reason the
Makefile is in this diff. `dev-resume` states that helm's three-way merge
"sees no manifest diff after a kubectl scale, so it would leave the replica
counts at zero". On that basis the deploy's third phase is unsound, because it
retires a colour with exactly that `kubectl scale`: the next release renders a
manifest identical to the last one, so an unrestored count would leave the
target colour at zero — and both `--atomic --wait` and `kubectl rollout status`
pass trivially there, since a 0-replica Deployment is vacuously rolled out, so
only the preview smoke test would catch it.

Measured on kind against helm 3.17 rather than reasoned about: install at 1,
`kubectl scale` to 0, `helm upgrade` with the value unchanged, and the live
object goes back to 1. That is Helm 3 patching the live object against the
rendered manifest rather than against the previous one; the comment captures
Helm 2. So the retirement is sound as written, the comment is corrected here,
and `dev-resume` keeps `kubectl` for the reason that does hold — a
`helm upgrade --wait` would re-run the release's hooks, including the schema
migrate, just to put a replica count back.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@athvin
athvin merged commit b77ad94 into main Nov 5, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants