-
Notifications
You must be signed in to change notification settings - Fork 268
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
Implement/local metrics #3609
Implement/local metrics #3609
Conversation
Signed-off-by: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KPostOffice The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @KPostOffice. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
Signed-off-by: Kevin <[email protected]>
/ok-to-test |
// If left empty, then metrics will expose for all local queues across namespaces. | ||
type LocalQueueMetrics struct { | ||
// Enable is a knob to allow metrics to be exposed for local queues. Defaults to false. | ||
Enable bool `json:"enable,omitempty"` |
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.
Could we just take the absence of LocalQueueMetrics to mean that this is not enabled?
@@ -300,6 +344,19 @@ func (r *LocalQueueReconciler) SetupWithManager(mgr ctrl.Manager, cfg *config.Co | |||
Complete(WithLeadingManager(mgr, r, &kueue.LocalQueue{}, cfg)) | |||
} | |||
|
|||
func localQueueStatusMetricForReason(reason string, queue *kueue.LocalQueue) { | |||
switch reason { |
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.
I am very confused on this block of code. Reading the correspondence between the reason and the metric string makes me feel like something is wrong..
If nothing is wrong, can we consider making the metric string match the reason?
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.
There is a lot of code here without any unit tests. I'm not sure what we have existing in this repo for testing around metrics but this code is nontrivial so it may be worth thinking of some test.
@KPostOffice: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
In favor of #3673 |
@tenzen-y: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
Implementation of LQ metrics KEP
Which issue(s) this PR fixes:
Fixes #1833
Special notes for your reviewer:
I'm uncertain if I've updated all the metrics in the right places. I still need to write tests, but I figured I'd open the PR as I have it now in case anything is egregiously off.
Does this PR introduce a user-facing change?