-
Notifications
You must be signed in to change notification settings - Fork 52
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
Relax validation on ReplicatedJob PodTemplates of suspended JobSets #580
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielvegamyhre 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 |
✅ Deploy Preview for kubernetes-sigs-jobset canceled.
|
pkg/webhooks/jobset_webhook.go
Outdated
if ptr.Deref(oldJS.Spec.Suspend, false) { | ||
for index := range js.Spec.ReplicatedJobs { | ||
mungedSpec.ReplicatedJobs[index].Template.Spec.Template.Spec.NodeSelector = oldJS.Spec.ReplicatedJobs[index].Template.Spec.Template.Spec.NodeSelector | ||
mungedSpec.ReplicatedJobs[index].Template.Spec.Template = oldJS.Spec.ReplicatedJobs[index].Template.Spec.Template |
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.
Question for @alculquicondor do Kueue/DWS require the ability to mutate any aspect of a pod template in a suspended JobSet? Or can we make this more targeted?
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.
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.
Thanks, I updated the PR to only allow the pod template and pod spec fields in the PodSetUpdate struct to be mutated on JobSet updates.
LGTM. |
/lgtm |
…-#580-upstream-release-0.5 Automated cherry pick of #580: relax validation on replicated jobs
Fixes #579
I also moved the validateFailurePolicy helper below the main exported ValidateX functions.
cc @alculquicondor @ahg-g