How Helm Handles OCI Repositories Differently

The differences between Helm's OCI repositories and standard Helm repositories, focusing on storage, authentication, and distribution mechanisms for managing Kubernetes charts.

Helm and Its Repositories

Helm is a package manager for Kubernetes. It packages applications into charts so they can be deployed and managed more easily. Traditionally, those charts live in standard Helm repositories — HTTP-based servers that host chart archives. But Helm now also supports OCI (Open Container Initiative) repositories, which offer an alternative approach to chart storage and distribution.

How do the two differ? This article explores how Helm handles OCI repositories differently compared to standard Helm repositories, focusing on key distinctions in storage, authentication, and distribution.

Storage and Structure

Standard Helm repositories are typically HTTP servers, such as a web server or a hosted solution like ChartMuseum, that store chart packages as .tgz archives alongside an index.yaml file. The index.yaml serves as a metadata catalog, listing available charts, their versions, and download URLs. These repositories are simple to set up but rely on the server’s file system or object storage to manage chart artifacts.

In contrast, OCI repositories leverage container registries, such as Docker Hub, Harbor, or Amazon ECR, to store Helm charts as OCI artifacts. Instead of .tgz files, charts are packaged as container images with a specific media type, allowing them to be stored alongside Docker images in the same registry. This eliminates the need for a separate index.yaml file, as the registry’s native catalog and tagging mechanisms handle chart discovery and versioning. By using OCI registries, Helm charts benefit from the robust infrastructure designed for container image storage, including features like content-addressable storage and efficient caching.

Distribution and Versioning

Standard Helm repositories rely on the index.yaml file to manage chart versions and dependencies. When a user runs helm repo update, Helm fetches the index.yaml to discover available charts and versions. This approach requires repository maintainers to update the index file whenever a new chart version is added, which can introduce manual overhead or require automation scripts. Additionally, standard repositories do not natively support features like immutability or content verification, making it harder to ensure chart integrity.

OCI repositories handle distribution and versioning more seamlessly by using the registry’s tagging system. Charts are stored as tagged artifacts, similar to container images, and Helm interacts with the registry’s API to list available versions or pull specific charts. This allows Helm to take advantage of registry features like immutable tags and content digests, ensuring that a chart’s contents are verifiable and consistent. For example, pulling a chart with a specific digest (helm pull oci://registry/chart@sha256:abc123) guarantees the exact artifact, reducing the risk of supply chain attacks. Furthermore, OCI registries support multi-architecture artifacts, enabling Helm charts to include platform-specific metadata or dependencies.

Workflow Integration

The workflow for managing charts in standard Helm repositories typically involves generating a .tgz package, uploading it to the HTTP server, and updating the index.yaml file. Tools like helm package and helm repo index assist in this process, but the workflow is distinct from container image management, requiring separate tooling and pipelines.

With OCI repositories, Helm charts are managed using workflows similar to those for container images. Developers can use helm push to upload charts to a registry and helm pull to retrieve them, mirroring the docker push and docker pull commands. This convergence simplifies CI/CD pipelines, as teams can use the same registry and authentication mechanisms for both charts and images. For example, a single GitHub Actions workflow can build a container image, push it to an OCI registry, and then push a corresponding Helm chart to the same registry, streamlining the release process.

Authentication and Access Control

Standard Helm repositories rely on the HTTP server that hosts them. A web server might use basic HTTP authentication. Or it might use a tool like ChartMuseum for token-based access. These methods are not standardized. Securing a Helm repository often takes extra setup, such as SSL/TLS or an identity provider.

OCI repositories work differently. They inherit the security of container registries. Most registries support standard protocols like OAuth2 or token authentication. This makes it easier to connect with enterprise identity systems. For example, pushing charts to an OCI registry like Harbor can use the same credentials as Docker images. This streamlines access control.

OCI registries also offer role-based access control (RBAC). Administrators can set permissions at the repository or tag level. That is more robust than the ad-hoc security of standard Helm repositories.

Practical Considerations

While OCI repositories offer advantages, they also introduce complexity. Standard Helm repositories are lightweight and easy to host, requiring only an HTTP server or cloud storage bucket. OCI repositories, however, depend on a container registry, which may involve additional setup, costs, or infrastructure management. For organizations already using a registry for container images, this overhead is minimal, as they can reuse existing infrastructure. However, small teams or projects without a registry may find standard repositories more practical.

Another consideration is compatibility. Helm’s OCI support, introduced as an experimental feature in Helm 3.8 (released on January 12, 2022) and stabilized in later releases, requires a modern version of Helm. Older Helm clients or tools may not support OCI repositories, potentially limiting adoption in legacy environments. Additionally, while OCI registries provide robust features, they may impose storage or rate limits, particularly in public registries like Docker Hub, which could affect chart hosting.

Conclusion

Helm now works with OCI repositories. This brings chart management closer to container registries. Standard Helm repositories need an HTTP server and an index.yaml file. OCI repositories store charts as container artifacts instead. They use the registry's own features for login, versioning, and distribution.

This approach lines up with how teams already manage images. It can also improve security. But the right choice depends on your setup. Think about your infrastructure, your team's skills, and what works with your tools. Knowing these differences helps you pick the repository type that fits your Kubernetes needs.