[linstor] Fix swapped VMPodScrape job labels#2264
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical misconfiguration in the LINSTOR monitoring setup by correcting swapped Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request modifies podscrape.yaml to adjust Prometheus scraping configurations. It swaps the job labels for two distinct relabelConfigs blocks: one now targets linstor-satellite instead of linstor-controller, and the other targets linstor-controller instead of linstor-satellite. A review comment suggests improving the regex used in the labeldrop action within both relabelConfigs blocks to prevent unintended label drops by anchoring the regex (e.g., ^(endpoint|namespace|pod|container)$).
| - action: labeldrop | ||
| regex: (endpoint|namespace|pod|container) | ||
| - replacement: linstor-controller | ||
| - replacement: linstor-satellite |
There was a problem hiding this comment.
The regex on the preceding line for labeldrop is broad and could unintentionally drop labels that contain endpoint, namespace, pod, or container as substrings (e.g., pod_template_hash). To ensure only exact label names are matched, it's safer to anchor the regex.
A more robust regex would be ^(endpoint|namespace|pod|container)$.
This applies to the other relabelConfigs block in this file as well.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughPrometheus relabeling in a PodScrape template was corrected so each VMPodScrape assigns its matching Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
|
Hi, @sasha-sup |
84bce7b to
273b84a
Compare
Signed-off-by: sasha-sup <alexsup4ik@gmail.com>
273b84a to
bad5910
Compare
|
Successfully created backport PR for |
|
Successfully created backport PR for |
What this PR does
Fixes swapped
joblabels in thecozy-linstorVictoriaMetricsVMPodScrapetemplates.Before this change:
linstor-satellitemetrics were relabeled asjob=linstor-controllerlinstor-controllermetrics were relabeled asjob=linstor-satelliteThis caused
linstorControllerOfflinealerts to fire for satellite endpoints such as:9942while reporting that the controller was unreachable.After this change:
linstor-satellitemetrics keepjob=linstor-satellitelinstor-controllermetrics keepjob=linstor-controllerThis restores consistent alerting and dashboard semantics for LINSTOR monitoring.
Release note
Summary by CodeRabbit