Lesson 08 of 10 · Delivery and operations
Distributing and securing charts
Publish charts to OCI registries alongside images, version them immutably, sign and verify them, and mirror third-party charts and every image they reference for air-gapped or tightly controlled environments.
Charts are artifacts
Treat charts like container images: built once, versioned, stored in a registry, signed, promoted, never edited in place.
The school prints the official recipe book once per edition, numbers each edition, and stamps it with the head cook's seal. Nobody scribbles in an old edition; a change means a new edition.
OCI registries
Helm 3 can push charts to any OCI registry (Harbor, ECR, ACR, Artifact Registry, GHCR, Artifactory):
$ helm package ./orders
$ helm push orders-0.1.0.tgz oci://registry.example.com/charts
$ helm pull oci://registry.example.com/charts/orders --version 0.1.0
Benefits: one place for images and charts, the same permissions, replication, retention rules and vulnerability scanning.
Versioning
- Semantic versions: major for breaking changes in values or behaviour, minor for features, patch for fixes.
- Immutable versions: never overwrite a published version (configure the registry to forbid it).
- Pin consumers to exact versions; let bots propose upgrades.
Signing and verifying
Sign the chart artifact in the registry with cosign (key-based with a KMS/HSM key, or keyless in CI using the pipeline's OIDC identity), and verify it in CI and before deployment:
$ cosign sign --key awskms:///alias/charts registry.example.com/charts/orders@sha256:<digest>
$ cosign verify --key cosign.pub registry.example.com/charts/orders:0.1.0
Helm's older provenance files (helm package --sign, helm verify) also work for classic repositories. Pin image digests inside charts (or in values) for full reproducibility, and verify image signatures at admission as well.
Mirroring third-party charts
For control (and mandatory for air-gapped sites):
- Pull the chart version you reviewed; push it to your registry.
- Render it with your values and list every image, including init containers, hook Jobs and subcharts.
- Mirror those images (for example
crane copyorskopeo copy), scan and re-sign them. - Point values at the internal registry (
global.imageRegistryor per-image repository values). - Record the source and version so updates can be reviewed the same way.
The image you forgot
A hook Job or an optional subchart often uses an image you didn't mirror. The install succeeds, and the hook fails at the worst moment. Always enumerate images from the rendered output with your real values.
Try it
Run a local registry (docker run -d -p 5000:5000 registry:2), package and push the orders chart to oci://localhost:5000/charts (--plain-http), pull it back by version, and render it. Generate a cosign key pair, sign the chart by digest and verify it.
Recap
- Store charts in OCI registries with immutable semantic versions; pin consumers.
- Sign charts and images, verify in CI and before deploy.
- For mirrored and air-gapped use, copy the chart and every image it renders, and repoint values.
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.