feat: add commonLabels and podLabels support#120
Merged
tazarov merged 2 commits intoFeb 17, 2026
Conversation
Add `commonLabels` and `podLabels` values for injecting custom labels into chart resources. - `commonLabels` — merged into `chart.labels`, applied to all resource metadata (StatefulSet, Service, Ingress, test Jobs) - `podLabels` — applied to pod template labels alongside chart.labels (does not affect `spec.selector.matchLabels`) This is a common pattern in the Helm ecosystem (see metrics-server, ingress-nginx, cert-manager) that enables operators to apply organizational labels without forking or wrapping the chart.
- Add chart.labels to all ConfigMaps and Secrets in config.yaml - Add chart.labels to volumeClaimTemplates PVC metadata - Bump chart version 0.1.25 -> 0.1.26 - Document commonLabels and podLabels in README
931a47a to
c6c9e85
Compare
Contributor
|
@ianhundere thanks for this. I've added labels to secrets/configmaps/volume templates + updated docs to surface the labels value |
Contributor
Author
|
hey, thanks for merging this! any chance you could cut a new release so we can pick it up? we've been running a wrapper _helpers.tpl override to inject labels and would love to drop it |
Contributor
|
@ianhundere, sure thing. I'll cut a new release in a few minutes. |
Contributor
|
@ianhundere done 0.2.0 of the chart is available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
commonLabelsvalue — merged intochart.labels, applied to all resource metadata (StatefulSet, Service, Ingress, test Jobs)podLabelsvalue — applied to pod template labels alongsidechart.labels(does not affectspec.selector.matchLabels)This is a common pattern in the Helm ecosystem for enabling operators to apply organizational labels (e.g.,
team,environment,cost-center) without forking or wrapping the chart.Reference implementations:
Changes
values.yamlcommonLabels: {}andpodLabels: {}templates/_helpers.tplcommonLabelstochart.labelstemplatetemplates/statefulset.yamlpodLabelsto pod template metadataBackwards compatible
Both values default to
{}— no change in behavior for existing users.matchLabelsis unaffected (useschart.selectorLabelsonly).