Lesson 10 of 10 · Delivery and operations
Capstone: from copied charts to one library
Plan the migration of 200 copy-pasted service charts to one platform library chart: inventory and group them, design the library around the common cases, migrate with rendered-output comparison, carry future changes with automated updates, and use policy only where it must.
The situation
200 services, each with a chart copied from a template three years ago and edited since.
- 12 different ways of setting labels; probes missing in 40 charts; no PDBs in most.
- Security asks: run as non-root and read-only root filesystem everywhere within a quarter.
- Every cross-cutting change today means 200 pull requests written by hand.
Two hundred classes each copied the school rules years ago and changed bits. Now one rule must change everywhere. You'll make one official rule sheet, help each class switch to it, check nothing important is lost, and from then on change the sheet once.
Your task
Write a plan covering inventory, library design, migration, keeping things current, enforcement, and how you'll measure progress.
Reference plan (one good version)
1. Inventory (week 1). Script over all repositories: render each chart with its production values; extract kinds, labels, probes, resources, security contexts, extra objects. Group charts by shape: "standard HTTP service" (~150), "worker" (~30), "special" (~20).
2. Library design (weeks 2-3). A platform-lib library chart with named templates for Deployment, Service, PDB, HPA, ServiceMonitor, NetworkPolicy; secure defaults (non-root, read-only root filesystem, dropped capabilities, seccomp); probes and resources required or defaulted; a values.schema.json per consumer type; small, explicit escape hatches (extra env, extra volumes, extra ports). Golden-output tests for representative values.
3. Pilot (weeks 3-4). Migrate five standard services with their teams. For each, render old and new with real values, diff, and explain every difference (most are improvements; some reveal missing library options). Deploy through rings.
4. Migration at scale (weeks 5-10). A script generates the new Chart.yaml and minimal values.yaml from the old values and opens a pull request per service, including the rendered diff in the description. Teams review and merge; platform engineers pair with the "special" services or leave them on their own charts with an owner.
5. Keep current. Semantic versions for the library; Renovate opens bump PRs; release notes; ring rollouts; a scorecard showing library version per service.
6. Enforcement. Admission policy in Audit mode from week 1 for non-root and read-only root filesystem; switch to Enforce per namespace once services have migrated, with dated, owned exceptions for the rest.
7. Metrics. Services on the library (target 90% by end of quarter); policy violations over time; time to ship a cross-cutting change (from weeks to under one week); incidents caused by chart changes.
Presenting it
- Show the inventory numbers first; they make the problem real.
- Make the rendered diff the centre of the migration: it is what earns teams' trust.
- Be clear that enforcement comes after the easy path exists.
Recap
- Inventory by rendering real values; group charts by shape.
- Build a library with secure defaults, schemas and small escape hatches; test it with golden outputs.
- Migrate with rendered diffs and pull requests, keep current with automated bumps, enforce with policy last.
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.