kubernetes-sigs / kueue

Kubernetes-native Job Queueing
https://kueue.sigs.k8s.io
Apache License 2.0
1.47k stars 262 forks source link

Re-Implement manageJobsWithoutQueueName as MutatingAdmissionPolicies (MAP) generator #3636

Open tenzen-y opened 5 hours ago

tenzen-y commented 5 hours ago

What would you like to be added: I would like to re-implement the manageJobsWithoutQueueName as MAPs generator. So, if cluster admins enable the feature, the kueue-controller-manager just creates the MAPs for enabled Jobs, and then we will remove the current webhook mechanism.

Why is this needed: The current manageJobsWithoutQueueName is implemented as a webhook, and the webhook will be called many times based on the Jobs creation. In the large cluster, the many webhook calls increase the kube-apiserver load, and it will make the cluster slow down.

So, I would recommend re-implement the mechanism as a MAP generator since the MAPs are evaluated within the kube-apiserver and will not all external webhook servers (kueue-controller-manager).

Completion requirements:

This enhancement requires the following artifacts:

The artifacts should be linked in subsequent comments.

Note that MutatingAdmisionPolicy is still alpha in v1.32 (https://github.com/kubernetes/enhancements/issues/3962). So, we can consider this after the Beta graduation.