kueue
kueue copied to clipboard
Report the position of a Workload in a queue via the visibility API
What would you like to be added:
Provide a visibility endpoint that returns the position of a workload in a LocalQueue or ClusterQueue.
This is a continuation of https://github.com/kubernetes-sigs/kueue/issues/168
Why is this needed:
To improve visibility to end users so they can estimate how long they will have to wait for their workloads to run
Completion requirements:
This enhancement requires the following artifacts:
- [x] Design doc
- [x] API change
- [x] Docs update
The artifacts should be linked in subsequent comments.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
/assign
Note that this issue requires a design (in the keps/ folder) prior to implementation.
@alculquicondor Thanks for letting me know! I have no experience writing KEP ... I would be glad to know if you have any resources to help me!
The best starting point would be to read the existing KEP for the visibility API. https://github.com/kubernetes-sigs/kueue/tree/main/keps/168-2-pending-workloads-visibility
@alculquicondor I have a question. Is what you want to accomplish with this issue to estimate the number of minutes until the pending workload is executed?
@alculquicondor I have a question. Is what you want to accomplish with this issue to estimate the number of minutes until the pending workload is executed?
From my understanding, the answer is no. I would like to assume the goal of this enhancement is to provide the ability to specify workload name query parameters something like /apis/visibility.kueue.x-k8s.io/v1alpha1/namespaces/default/localqueues/user-queue/pendingworkloads?workload=myworkload.
yeah, we only want to know what is the current position of the workload in the queue. We don't have the means to estimate the wait time at the moment (Kueue doesn't have long term memory).
However, this feature is a step towards that.
If this has not been worked on, I can help with making this feature possible. @alculquicondor @tenzen-y
@alaypatel07 I have been too busy with work lately to work on this issue. If you are able to get to it, I would be very grateful for your help in resolving this issue!
@alaypatel07 If you want to work on this issue, feel free to assign yourself with /assign.
yes I can help with this issue, thanks folks.
/assign
/unassign @highpon
@tenzen-y @alculquicondor I have been playing around the visibility API and I can create the kep for implementing
/apis/visibility.kueue.x-k8s.io/v1alpha1/namespaces/default/localqueues/user-queue/pendingworkloads?workload=myworkload
Since workload is a namespaced resource, I wonder if this feature should only apply on localqueues?
The issue with fetching the workload from cluster queue is two fold:
- in order to correctly resolve the workload name in cluster queue, the URI will require additional arg workloadNamespace, something like this:
kubectl get --raw "/apis/visibility.kueue.x-k8s.io/v1alpha1/clusterqueues/cluster-queue/pendingworkloads?workloadName=myworkload&workloadNamespace=default"
- The information on where the workload is in global queue is already available from localqueue response in
positionInClusterQueuefield so not sure why the same information will be needed from globalqueue URL.
Any thoughts on this will be helpful, TIA
I don't think you should be piggy-backing on the existing URLs. We should have a new URL just for workloads, something like this:
/apis/visibility.kueue.x-k8s.io/v1alpha1/namespaces/<ns>/workloads/<name>
The next question is whether it should present any information if it's not pending, and what it should present.
@alculquicondor out of curiosity why would having a new URL be preferable?
IIUC, visibility API w.r.t. workload only provides information about a workload on the queue and extending the existing URL will give users a way to filter the 1 WL out of all the pending ones May be in the future have an additional arg of label selector as query to filter from pending workloads URL.
Are there any use case that I'm missing which will be achieved better with a separate URL?
Think of it the other way: I want a way to know all the queueing information for a particular workload.
Then the endpoint gives me in which queue it's queued and what its position.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
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.