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.
More on Chart Structure & Metadata
What files does `helm create mychart` generate and which ones matter?BeginnerWhat are the required fields in `Chart.yaml`?BeginnerWhat is the difference between `version` and `appVersion`?BeginnerWhy should `appVersion` be quoted in `Chart.yaml`?BeginnerWhat does `type: library` vs `type: application` mean?BeginnerWhat is the `kubeVersion` field used for?Intermediate