-
Notifications
You must be signed in to change notification settings - Fork 300
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
Enable sorting of queue items based on a custom timestamp extracted from an annotation #4415
Comments
I am a bit confused. https://cloud.google.com/kubernetes-engine/docs/tutorials/kueue-intro This seems to say that we have support of FIFO for queueing. |
We have received similar requests many times. However, we could not accept it since such custom timestamp could violate fairness. All workloads should be fair under the Kueue algorithms. Such annotation allows evil users to prioritize their tasks. |
@tenzen-y thank you for your response. The feature I'm suggesting can be disabled by default and enabled by an administrator that would like it. The annotation on the Job which contains the cusotm timestamp, for example, can be protected by an admission web hook that will allow only specific controllers to set it or by using RBAC. Another example, in a multi tenant scenario, if each tenant has its own ClusterQueue, tenants can't prioritize their Workloads over other other tenants. I think that the fact there were several similar requests is an indication for a real use case. |
I think the current priority and creation timestamp base queuing is a guardrail to keep consistency across all Kueue features.
Is there any reason why WorkloadPriorityClass and core PriorityClass do not satisfy this case? |
What would you like to be added:
Enable sorting of queue items based on a custom timestamp extracted from an annotation.
Why is this needed:
Queuing plain pods created by Tekton can be highly beneficial for sharing quotas and achieving more consistent scheduling (FIFO based on the pod's creation timestamp). A short demo on this topic can be found here.
The experience could be further improved by allowing pods in the queue to be sorted based on the creation timestamp of the Tekton PipelineRun they belong to.
This would prioritize pods associated with "older" pipelines, helping them complete first and reducing timeouts.
Completion requirements:
Kueue should be able to read a timestamp from an annotation set on the workload and use it for sorting workloads in the queue.
It should be possible to copy annotations from the Job to the Workload, similar to how labels can be copied.
Tekton should set the creation timestamp of the PipelineRun as an annotation on the pods belonging to that PipelineRun (this should be implemented in Tekton).
This enhancement requires the following artifacts:
The artifacts should be linked in subsequent comments.
The text was updated successfully, but these errors were encountered: