-
Notifications
You must be signed in to change notification settings - Fork 962
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
feature: Add podgroups statistics #3751
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
a91a112
to
9315036
Compare
cmd/controller-manager/app/server.go
Outdated
@@ -177,3 +188,10 @@ func isControllerEnabled(name string, controllers []string) bool { | |||
// if we get here, there was no explicit inclusion or exclusion | |||
return hasStar | |||
} | |||
|
|||
func promHandler() http.Handler { |
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.
This is duplicated with the func in scheduler.
@@ -58,7 +58,7 @@ rules: | |||
verbs: ["get", "create", "delete", "update"] | |||
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"] | |||
resources: ["podgroups", "queues", "queues/status"] | |||
verbs: ["get", "list", "watch", "create", "delete", "update"] | |||
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"] |
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.
Is update still need?
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.
Is there something I'm missing? Where is the logic for deleting the update queue status
@@ -37,6 +37,7 @@ const ( | |||
defaultMaxRequeueNum = 15 | |||
defaultSchedulerName = "volcano" | |||
defaultHealthzAddress = ":11251" | |||
defaultListenAddress = ":8080" |
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.
Would a different port be better?
- Make a distinction with the scheduler port.
- Port 8080 is too common and prone to conflicts.
Sorry I don't get the point, you mean that when the queue is deleted, the metrics need also be deleted, right? |
Sorry I didn't express myself clearly. |
Oh yes now the pending/running/unknown/inqueue/completed pg statistics won't be persisted into etcd, see here:
You can see above that the data called |
8b51344
to
996a0de
Compare
Signed-off-by: JesseStutler <chenzicong4@huawei.com>
fix #3597, related proposal pr: #3750
Implementation
syncQueue
of queue controller, concurrently usingUpdateStatus
will cause conflict, useApplyStatus
instead, and need to add patch permission of vc-controller forpatch/status
. And we record the statistics of podgroups in each state in queue as metrics to be exported outside, we don't update the statistics of podgroups in queue's status now.vcctl get -n [name]
andvcctl list
display the statistics of podgroups in each state from queue's status directly, instead we do one more step, query the podgroups owend in the queue, stat the counts of podgroups in each state at the vcctl side, and then display them.Verification