Interview Prep/Helm/Chart Structure & Metadata

Why does the `helm.sh/chart` label replace `+` with `_`?

IntermediateConceptChart Structure & Metadata
Answer

SemVer allows build metadata (1.4.0+build.17), but + is not a valid character in Kubernetes label values (allowed: alphanumerics, -, _, ., max 63 chars). Without the replace, a chart version with build metadata makes every resource fail validation with metadata.labels: Invalid value: "shop-1.4.0+build.17". OCI tags have the same restriction, so helm push converts + to _ in the tag.

All Helm questions Roadmap: Helm

More on Chart Structure & Metadata