Sub topic 8
How chart versions become tags
This chapter assumes you can package a chart with helm package, read Chart.yaml, and push to a registry you are logged in to. It covers how the version field in Chart.yaml becomes the OCI tag, and what that means for releasing.
The mapping
When you run helm push, Helm reads the chart name and version from the archive. It does not read them from the file name or from the registry path you type. The result is:
- The repository path is the path you gave plus the chart name.
- The tag is the chart
version.
Take this Chart.yaml:
apiVersion: v2
name: myapp
description: Example application chart
type: application
version: 0.1.0
appVersion: "1.0.0"Packaging and pushing it produces the reference registry.example.com/charts/myapp:0.1.0.
helm package ./myapp
helm push myapp-0.1.0.tgz oci://registry.example.com/charts
# Pushed: registry.example.com/charts/myapp:0.1.0Version versus appVersion
Two fields look similar but do different jobs.
| Field | Meaning | Used as the OCI tag? |
|---|---|---|
| `version` | Version of the chart itself | Yes |
| `appVersion` | Version of the application the chart deploys | No |
If you change a template but not the application, bump version only. If you ship a new application release with no template change, you still bump version, because the registry needs a new tag for the new archive. Update appVersion to describe the application.
Version rules
Chart versions must be valid SemVer 2, such as 1.4.2 or 1.5.0-rc.1. OCI tags have a narrower character set than SemVer. SemVer build metadata uses a +, as in 1.0.0+build.5, and + is not allowed in a tag. Helm converts the + to an underscore when it pushes, giving 1.0.0_build.5. When you pull or install, you still write the version with +, and Helm converts it again.
helm install my-release oci://registry.example.com/charts/myapp --version 1.0.0+build.5Be aware that two versions that differ only in build metadata are equal under SemVer ordering. Do not rely on build metadata to distinguish releases.
Tags are mutable
A registry tag is a pointer. Many registries let you push a second archive with the same version, and the tag then points to the new content. Helm does not stop you. Anyone who installed 0.1.0 earlier and installs it again may get different content.
Treat published versions as immutable:
- Never re-push an existing version. Bump
versioninstead. - If your registry supports it, turn on tag immutability for the chart repository.
- For a guarantee that does not depend on registry settings, pin by digest, which a later chapter covers.
Choosing a version at install time
Without --version, Helm resolves the latest stable tag. It ignores pre-release versions unless you ask for them. Because the version is not part of the URL, a missing flag can silently change what you deploy. In scripts and CI, always pass it.
helm show chart oci://registry.example.com/charts/myapp --version 0.1.0
helm pull oci://registry.example.com/charts/myapp --version 0.1.0Common errors
- The push reports a different tag than you expected. Helm used the
versioninsideChart.yamlat package time. Runhelm packageagain after editing it. An old.tgzkeeps its old version. - The version is rejected as invalid. Check that it is SemVer 2. Values like
1.0orv1.0.0can fail or behave unexpectedly. Use1.0.0. - Install pulls an older chart than you expected. You may have omitted
--version, or only a pre-release exists for the newer version.
Exercise
A chart's Chart.yaml has name: shop, version: 2.3.1 and appVersion: "9.0". You run helm push shop-2.3.1.tgz oci://registry.example.com/team/charts. What is the full reference that is pushed, and which field would you change to publish a template-only fix without touching the application?
Show answer
The reference is registry.example.com/team/charts/shop:2.3.1. The repository path is the push path plus the chart name, and the tag is the chart version. For a template-only fix, bump version (for example to 2.3.2) and leave appVersion at "9.0".
Exercise
A chart has version 1.2.0+build.7. What tag does the registry store, and what do you pass to --version when installing?
Show answer
The registry stores 1.2.0_build.7, because a plus sign is not allowed in a tag and Helm replaces it with an underscore. You still pass --version 1.2.0+build.7 when installing, and Helm converts it.