Add a chart-wide podLabels value - #55
Conversation
Adds a top-level `podLabels` that lands on every pod the chart renders, including the migration Job, with each component's own `podLabels` applied on top. The labels stay off the Deployment selectors, which are immutable, so an existing release can take one without a reinstall. Without this a cluster convention such as an environment label had to go on after rendering, through a Kustomize post-renderer per workload kind.
|
Warning Review limit reachedNext included review available in 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Helm chart adds a global ChangesGlobal pod label configuration
Merge Risk: 🟡 Moderate · up to Global pod labels can overwrite selector-owned identity labels, causing Kubernetes to reject a Deployment or leave updated pods unmatched during an upgrade; because the setting applies across the chart, one bad label can affect multiple workloads. Merge should wait for reserved-key protection or explicit owner acceptance of this bounded rollout risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (8 skipped: 8 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 758d5348-cf54-4267-82b4-be13bd50f65a
📒 Files selected for processing (9)
changelog/55.feature.mdhelm/README.mdhelm/templates/_helpers.tplhelm/templates/api/deployment.yamlhelm/templates/flower/deployment.yamlhelm/templates/migrate-job.yamlhelm/templates/providers/deployment.yamlhelm/values.yamltests/test_helm_render.py
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
| {{- with (include "ref.podLabels" .) }} | ||
| {{- . | nindent 8 }} | ||
| {{- end }} |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Protect selector-owned labels from configurable overrides.
Global and component podLabels are rendered after canonical selector labels. If either map contains a selector identity key such as app.kubernetes.io/name, app.kubernetes.io/instance, or the component label, the pod template can contain duplicate or mismatched values while spec.selector remains unchanged. Kubernetes may reject the Deployment or leave pods unmatched, and the same configuration can affect multiple workloads. Reject selector-reserved keys or render canonical selector labels last, with regression coverage for each Deployment.
📍 Affects 2 files
helm/templates/api/deployment.yaml#L32-L34(this comment)helm/templates/flower/deployment.yaml#L27-L29
Source: MCP tools
Adds a top-level
podLabelsthat lands on every pod the chart renders, including the migration Job. A component's ownpodLabelsis applied on top of it, so a per-component override still wins.The labels stay off the Deployment selectors, which are immutable, so an existing release can take one without a reinstall.
Without this a cluster convention such as an environment label had to go on after rendering, through a Kustomize post-renderer with a separate patch per workload kind.
Summary by CodeRabbit
New Features
podLabelssetting for applying labels to every rendered pod, including migration jobs.Documentation