[helm-dashboard] Add commonLabels support - #730
Closed
ashutoshbhardwaj007 wants to merge 1 commit into
Closed
Conversation
## What this PR does
Adds `commonLabels` support to the helm-dashboard chart, allowing users
to define a set of labels that are applied to all chart-managed resources.
## Why
Teams running helm-dashboard in shared or multi-tenant clusters commonly
need to attach labels to all resources for:
- Cost allocation and chargeback (e.g. `team:`, `env:`, `cost-center:`)
- Network policy targeting
- Label-based selectors and queries (e.g. in Prometheus, Grafana, kubectl)
- Compliance and audit requirements
Currently the chart only supports labels on the PersistentVolumeClaim
(`dashboard.persistence.labels`). There is no way to label the
Deployment, Service, ServiceAccount, Ingress, or pod template without
forking the chart.
## Changes
- Add `commonLabels: {}` to `values.yaml`
- Apply the helper to all chart-managed resources:
- Deployment (metadata + pod template)
- Service
- ServiceAccount
- Ingress
## Usage
```yaml
commonLabels:
team: platform
env: production
cost-center: infra
```
## References
- Similar implementation in prometheus-community charts:
prometheus-community/helm-charts#6608
Collaborator
|
Have you tested that it does what you claim? |
Collaborator
|
Answering my own question above: the change as submitted is a no-op. I opened #739, which carries your commit and adds the templating: the value is merged into the Thanks for raising it. |
pull Bot
pushed a commit
to bhardwajRahul/helm-dashboard
that referenced
this pull request
Aug 10, 2026
) Applies commonLabels to every rendered resource, wires up the likewise-unused dashboard.persistence.labels, and adds the missing README rows. Closes komodorio#730 Co-authored-by: ashutoshbhardwaj007 <ashutosh.bhardwaj@poppulo.com>
Contributor
Author
|
Thanks @undera |
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.
What this PR does
Adds
commonLabelssupport to the helm-dashboard chart, allowing users to define a set of labels that are applied to all chart-managed resources.Why
Teams running helm-dashboard in shared or multi-tenant clusters commonly need to attach labels to all resources for:
team:,env:,cost-center:)Currently the chart only supports labels on the PersistentVolumeClaim (
dashboard.persistence.labels). There is no way to label the Deployment, Service, ServiceAccount, Ingress, or pod template without forking the chart.Changes
commonLabels: {}tovalues.yamlUsage
References