Merged
Conversation
Capacity/allocation metrics now include: - `physical_pool` which tells you what pool the physical hardware the capacity/allocation belongs to - `capacity_class` which tells you if the capacity is coming from dedicated or shared hardware Also fixed bug where the metrics were wrong for away nodes Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
dejanzele
reviewed
Feb 26, 2026
dejanzele
reviewed
Feb 26, 2026
|
|
||
| func NewClusterAvailableCapacity(value float64, cluster string, pool string, resource string, nodeType string, reservation string) prometheus.Metric { | ||
| return prometheus.MustNewConstMetric(ClusterAvailableCapacityDesc, prometheus.GaugeValue, value, cluster, pool, resource, nodeType, reservation) | ||
| func NewClusterAvailableCapacity(value float64, cluster string, pool string, resource string, nodeType string, reservation string, physicalPool string, capacityClass string) prometheus.Metric { |
Member
There was a problem hiding this comment.
I am wondering at this point should we make the func accept a struct instead of 8 params
Contributor
Author
There was a problem hiding this comment.
Probably a good idea - but I think I'd rather do that in a separate PR
dejanzele
reviewed
Feb 26, 2026
| }, | ||
| nil, | ||
| ) | ||
| assert.Nil(t, err) |
Member
There was a problem hiding this comment.
This could even be require.NoError as no point in proceeding the test if we get an error here, it will fail with nil pointer deref afterwards
dejanzele
reviewed
Feb 26, 2026
| schedulable = "schedulable" | ||
| overAllocated = "overAllocated" | ||
| physicalPool = "physical_pool" | ||
| capacityClass = "capacity_class" |
Member
There was a problem hiding this comment.
Those are labels, right? Should we add a suffix Label like we have for the labels below
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
MustafaI
approved these changes
Feb 27, 2026
dejanzele
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Capacity/allocation metrics now include:
physical_poolwhich tells you what pool the physical hardware the capacity/allocation belongs tocapacity_classwhich tells you if the capacity is coming from dedicated or shared hardwareAlso fixed bug where the metrics were wrong for away nodes