-
Notifications
You must be signed in to change notification settings - Fork 283
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
propagate priority-class label for deploy and statefulset #3980
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
Why just deployments? I see that we aren’t passing these down for the other frameworks. Should we? |
Thank you for the PR. I think we need to do it for Deployments because the actual workloads are created per Pods. Similarly we need to propagate it for LWS so that the workloads per groups are prioritized correctly cc @mbobrovskyi . Except for Deployments and LWS the workloads are created actually at the CRD level and so I don't see a need to propagate the workload priorities down to pods for other Cards. Let me know if I'm missing a scenario. Actually I think this is more of a bugfix than a new feature because the API already existed we just didn't support it. /kind bug |
@Abirdcfly can you add some test for it? I think unit or E2e would be appropriate |
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.
Should we add validation for this field on ValidateUpdate()
?
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.
What type of validation do you mean? Also, would it be part of the PR or you are asking about a follow up?
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.
I think we should keep it immutable on ValidateUpdate like we have for other Jobs
kueue/pkg/controller/jobframework/validation.go
Lines 126 to 129 in cf5ef9f
func validateUpdateForWorkloadPriorityClassName(oldJob, newJob GenericJob) field.ErrorList { | |
allErrs := apivalidation.ValidateImmutableField(workloadPriorityClassName(newJob), workloadPriorityClassName(oldJob), workloadPriorityClassNamePath) | |
return allErrs | |
} |
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.
I have synced with @mbobrovskyi that the intended validation is to make this field immutable as we do it for Jobs: https://github.com/kubernetes-sigs/kueue/blob/main/pkg/controller/jobframework/validation.go#L126-L129.
I think this makes sense for consistency. I think we can relax later if there are such requests.
My only concern is that strengthening the validation could break some users, but since the workload-priority is currently ignored anyway so I think it is safe to strengthen the validation, and align with Jobs, as part of the PR.
Any opinions @Abirdcfly @dgrove-oss @tenzen-y ?
Actually, LWS I suggest to move to another PR, so that we can easily cherry-pick only the Deployments and STS if needed - I'm not yet sure this is something we want to qualify for cherry-picking, but it would be good to keep the door open. |
Signed-off-by: Abirdcfly <[email protected]>
/release-note-edit
|
/remove-kind feature |
LGTM label has been added. Git tree hash: 4657cdf917c1652fb5756d211a5f6513d39c7480
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Abirdcfly, mimowo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
What type of PR is this?
/kind bug
What this PR does / why we need it:
now, kueue auto propagete queue-name for deploy and statefulset, this pr will also add priority-class.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?