-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix k8s scheduler compatibility issue #19699
Conversation
Signed-off-by: chrismark <[email protected]>
Signed-off-by: chrismark <[email protected]>
Pinging @elastic/integrations-platforms (Team:Platforms) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting solution to this problem 👍 I have added some small suggestions.
Signed-off-by: chrismark <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
thank you for fixing this @ChrsMark ! |
(cherry picked from commit aa60a58)
What does this PR do?
This PR introduces
OpSetSuffix
in order to solve a compatibility issue in Kubernetes Scheduler metricset.In older version of k8s the Prometheus metric
scheduler_pod_preemption_victims
was a Gauge but recently they changed itto a Histogram. Until now we have been mapping this Gauge metric to
scheduling.pod.preemption.victims.count
field. This makes it impossible for the module to parse Prometheus metrics from newer versions of Scheduler where this filed is a Histogram. With this PROpSetSuffix
can try to check if the value of this metric is numeric and extend it withcounter
suffix otherwise it is of Histogram type and we do nothing. This makesscheduling.pod.preemption.victims.count
filed to be actually numeric in all cases since Histograms create this filed by default and when it is a Gauge we leverage theOpSetSuffix
to do the mapping appropriately.Why is it important?
In order to preserve compatibility with old and new versions of Prometheus metrics exported by Kubernetes Scheduler.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues