Sub topic 1
Why store Helm charts in an OCI registry
Many teams already run a container registry for their images. Helm can store packaged charts in that same registry. This chapter explains what that means, what ends up in the registry, and when it is worth using.
Prerequisites
This chapter assumes you have:
- Installed and upgraded a chart with Helm, and can read
Chart.yamlandvalues.yaml. - Helm 3.8 or later. OCI support is enabled by default from that version.
- Some familiarity with container registries and
docker loginstyle authentication. - A comfortable command line shell.
Check your Helm version first:
helm version --shortWhat OCI means for charts
The Open Container Initiative (OCI) defines how a registry stores and serves content. A registry that follows the OCI distribution specification stores artifacts, not only container images. An artifact is any content described by a manifest, a small JSON document that lists the pieces of the artifact and their digests. A digest is a SHA-256 hash of the content. Registries address content by digest, so identical content always has the same address.
Helm uses this to store a chart. The packaged chart (.tgz) becomes one layer of an OCI artifact, and Helm gives each piece its own media type so tools can tell it apart from an image.
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.cncf.helm.config.v1+json",
"digest": "sha256:...",
"size": 123
},
"layers": [
{
"mediaType": "application/vnd.cncf.helm.chart.content.v1.tar+gzip",
"digest": "sha256:...",
"size": 4567
}
]
}This is a simplified sketch. The config blob holds the chart metadata from Chart.yaml. The layer holds the chart archive. A signed chart also carries a provenance layer, covered in a later chapter.
Why teams choose it
- One system to run. You do not host a separate web server for chart files and an
index.yamlfile. The registry you already operate serves charts as well. - Existing authentication and access control. Registries already have users, tokens, and per-repository permissions. Helm reuses them, so a CI job can have push rights to
charts/and nothing else. - Content addressing. Every chart version has a digest. You can later pin a chart to that digest, so a deployment gets exactly the bytes you tested.
- Shared tooling. Replication, vulnerability and policy scanning, retention rules, and mirroring that you already use for images often work for charts too.
- No index to regenerate. A classic HTTP repository needs an index rebuilt every time you add a chart. A registry records each push itself.
What you give up
OCI storage changes how you work with charts in a few ways:
- There is no
helm repo addfor an OCI registry, andhelm search repocannot list charts stored there. You must know the chart's reference, or use your registry's own search or UI. - Each chart is addressed by its full path. You pass
oci://references to commands such ashelm pullandhelm install. - Some older registries and proxies do not accept the Helm media types. Check that your registry supports OCI artifacts before you plan around it.
The next chapter compares OCI with HTTP chart repositories in more detail.
What the rest of the tutorial covers
You will package a chart, build oci:// references, log in, push, pull, and install. Later chapters cover how chart versions become tags, OCI dependencies, digest pinning, signing, CI publishing, and troubleshooting.
Exercise
Name two things Helm stores in an OCI registry when you push a chart, and say what each one contains.
Show answer
The config blob contains the chart metadata taken from Chart.yaml. The layer contains the packaged chart archive (.tgz). A manifest ties them together, and a signed chart adds a provenance layer.
Exercise
Your team already has a registry with per-repository permissions for container images. Give two reasons to store charts there instead of running a separate HTTP chart repository, and one limitation you accept.
Show answer
You reuse the existing authentication and access control, and you avoid hosting a separate server and regenerating index.yaml. Charts also get digests that you can pin. The limitation is that helm repo add and helm search repo do not work with OCI registries, so you must know the full oci:// reference.