helm: Add support for custom pod and deployment labels
What happened?
Currently, the Helm chart hardcodes all labels to app: holmes for both the Deployment and Pod template spec
Request to add:
- podLabels - custom labels applied to pod template spec
- commonLabels - labels applied to all resources (deployment, service, etc.)
I'm happy to contribute this if maintainers are open to it
What did you expect to happen?
expected to add pod labels
How can we reproduce it (as minimally and precisely as possible)?
no option to add podLabels in values.yaml (podAnnotations are available tho)
Anything else we need to know?
No response
A summary of the changes CodeRabbit can apply:
Implement support for custom pod and resource labels by adding podLabels and commonLabels to helm/holmes/values.yaml, creating holmes.labels, holmes.selectorLabels, and holmes.podLabels helpers in helm/holmes/templates/_helpers.tpl, updating helm/holmes/templates/holmes.yaml (Deployment metadata, selector, pod template, Service) and helm/holmes/templates/hpa.yaml to use the new helpers, and adding helm/holmes/examples/custom-labels-example.yaml and helm/holmes/examples/README.md for documentation and examples.
Add configurable pod and common labels support by introducing podLabels and commonLabels in values.yaml, adding examples (examples/README.md and custom-labels-example.yaml), and updating Helm templates (templates/_helpers.tpl, templates/holmes.yaml, templates/hpa.yaml) to replace hard-coded app labels with {{ include "holmes.labels" }}, selector labels with {{ include "holmes.selectorLabels" }}, and pod labels with {{ include "holmes.podLabels" }}.
- [ ] ✅ Create PR with these edits
- [ ] 📋 Get copyable edits
Hi @KJone1, thanks for the report.
We always open to contributions :) On a pr and tag me, we will help you to push it further.
@moshemorad open a pr https://github.com/robusta-dev/holmesgpt/pull/1109