-
Notifications
You must be signed in to change notification settings - Fork 262
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
Raise an event when a WorkloadPriorityClass.kueue.x-k8s.io is not found #3439
Comments
+1, |
OTOH, maybe deactivating can be considered as a breaking change for some flows when the priority class is created after the workload or in parallel. So, I'm fine for just an event now. |
I think that we should implement the validation webhook to verify if the specified PriorityClass exists in the cluster. |
Technically we could but IIUC this means validation per Job CRD which is a lot of code.
I just tested it using batch/Job and referenced a non-existing
So, on vanilla k8s the Job creation isn't blocked, and we get an event on the Job object. I think reproducing this is reasonable. |
Yeah, I indicated the Pod creation: cat <<EOF | k apply -f -
> apiVersion: v1
kind: Pod
metadata:
name: high-priority-pod
namespace: default
spec:
priorityClassName: high-priority
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
> EOF
Error from server (Forbidden): error when creating "STDIN": pods "high-priority-pod" is forbidden: no PriorityClass with name high-priority was found |
I see, but IIUC |
An additional 2cts: The admission controller should not protect from a later deletion of In any case, I think that transparency improves user experience. Even if the Workload is disabled, that would be great to log the event; or to have information in the status. |
Yes, we definitely want the event, the only thing is that if we deactivate then we already have a mechanism to propagate the event to the Job object, so the solution will be shorter by reusing this path, and the information will be reflected both in event and status. wdyt @tenzen-y ? |
What would you like to be added:
When a job is created with a specified
kueue.x-k8s.io/priority-class
that does not exist ; then an event should be raised with aWarning
level in thenamespace
of thejob
and with the job as theinvolvedObject.name
Why is this needed:
When such a job is created nothing happens and it is difficult for the user to understand what is wrong except by reading the kueue controller manager logs. As this may require admin privileges, user may just remain blocked while searching for information.
Completion requirements:
The keueue logs show the following error message:
The relevant part being:
This enhancement requires the following artifacts:
The artifacts should be linked in subsequent comments.
The text was updated successfully, but these errors were encountered: