fix(chart): keep workload labels on scraped HAMi metrics - #2934
fix(chart): keep workload labels on scraped HAMi metrics#2934mesutoezdil wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mesutoezdil The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/kind bug |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe Helm chart now sets ChangesMetrics label preservation
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized chart change preserves workload labels on HAMi metrics without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Nine vGPUmonitor metrics and two scheduler metrics carry namespace, pod and container labels naming the GPU workload. The Prometheus Operator sets those same three names as target labels for every ServiceMonitor endpoint, and both endpoints left honorLabels unset, which renders as honor_labels: false. Prometheus then overwrites the bare names with the scrape target and moves the workload values to exported_namespace, exported_pod and exported_container. The result is that every series reports the vgpu-monitor pod instead of the workload, and the dashboard namespace variable, which reads label_values(hami_vgpu_memory_used_bytes, namespace), only ever offers the namespace HAMi itself runs in. Set honorLabels on both endpoints so the exposed labels win. Note that a Prometheus resource with overrideHonorLabels enabled forces honor_labels back to false for every scrape config it generates. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
ae918f0 to
984c315
Compare
Nine vGPUmonitor metrics and two scheduler metrics carry
namespace,podandcontainerlabels naming the GPU workload, but the Prometheus Operator sets those same three names as target labels for every ServiceMonitor endpoint and both endpoints lefthonorLabelsunset, so Prometheus overwrites them with the scrape target and moves the workload values toexported_namespace,exported_podandexported_container. Every series then reports the vgpu-monitor pod rather than the workload, and the dashboardnamespacevariable only ever offers the namespace HAMi itself runs in, so sethonorLabelson both endpoints.Does this PR introduce a user-facing change? The device plugin and scheduler ServiceMonitors now set honorLabels, so the namespace, pod and container labels on HAMi metrics keep identifying the GPU workload instead of being replaced by the scrape target. A Prometheus resource with overrideHonorLabels enabled still forces them back.