← all case studies

Case study 12 · featured

The fleet that patches itself (while engineers are watching)

Impact
A vendor announces a fix; the fleet is rotating onto it within hours.
My role
Wrote the architecture and rotation policy; co-built the event-driven image pipeline with two teammates.
Evidence
07:00–20:00 weekday coverage, an 18:00 rotation cutoff, and pool-specific disruption budgets.
securityreliability

The situation

We built security-patched machine images for our Kubernetes nodes — and then discovered they weren't reaching the nodes. Rotation was effectively off: replacement budgets set to zero, one production pool allowed a two-hour window per week (months to rotate the whole pool), and the monitoring nodes were configured to rotate during business hours — risking metric gaps in the middle of an incident.

Patched images existed; nothing consumed them.

What I did

I wrote the design that connected the two ends — an event-driven image pipeline feeding a deliberately scheduled node-rotation policy — and drove it with seven colleagues as named reviewers; the build pipeline itself was co-built with two teammates.

The build side is fully event-driven: when the OS vendor announces a security release (a public notification feed) or the upstream Kubernetes image changes (a poller watching the public parameter), the pipeline wakes up on its own, builds our patched image on top of the upstream one — applying security updates only, and never touching the container runtime, kubelet, or kernel, so we never diverge from what the cloud provider validated — and publishes the result per environment. Failed builds retry on the next cycle automatically.

The consumption side uses Karpenter's drift mechanism: a node whose image no longer matches the declared spec is flagged and replaced. The design decides when:

EXHIBIT — BUILD SIDE · EVENT-DRIVEN
OS security releasepublic notification feedUpstream EKS image changepublic parameter, polledImage buildsecurity updates onlyruntime, kubelet, kernel untouchedPatched image, datedPublished per environment
CONSUMPTION SIDE · SCHEDULED DRIFT
dev / stagingname-pattern match → instant driftproductionpinned ID → bot opens pull request→ human mergesBudget-limited rotationcoverage-hours schedule · per-pool exceptionsDisruption-rule-gated drainPatched fleetStuck terminationalert + runbookstuck over 12 h

The interesting part

The schedule math is where the craft hides. The scheduler reads times in UTC with no daylight-saving handling — so the windows are set to the intersection of summer and winter coverage, safe in both. And the whole policy is expressed as a handful of declarative budget blocks in the chart values, reviewed like any other code — the on-call calendar, encoded.

What it changed

Node patching went from "images exist, nobody consumes them" to a self-feeding loop: vendor announces a fix, the fleet is rotating onto it within hours in lower environments and one reviewed merge later in production — at a pace the on-call rota can actually absorb.