-
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
[StatefulSet] Allow to change replicas without queue-name. #3991
[StatefulSet] Allow to change replicas without queue-name. #3991
Conversation
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
/cc @mimowo |
/hold |
Also the current release note I think is not penetrable for users. It says what the code does but it does not say why a user would need to or what problem it solves from user perspective. At least I'm puzzled by what is the user observable issue. |
/close |
@mbobrovskyi: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@mimowo: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
replicasPath, | ||
)...) | ||
} | ||
if newQueueName != "" { |
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.
This covers 90% of cases. However, ideally, even if the StatefulSet has queue-name, but the owner is already managed by Kueue, then we don't do the validation.
It is more of a corner case, but this could matter for the LWS integration or AppWrapper.
Since this is a corner case I'm on a fence. I'm ok to merge as is, but maybe try to add the check @mbobrovskyi ?
Here is the code where we also look at the owner:
kueue/pkg/controller/jobframework/defaults.go
Lines 49 to 57 in 097262a
// Do not default suspend a job whose owner is already managed by Kueue | |
if owner := metav1.GetControllerOf(jobObj); owner != nil && IsOwnerManagedByKueue(owner) { | |
return false, nil | |
} | |
// Jobs with queue names whose parents are not managed by Kueue are default suspended | |
if QueueNameForObject(jobObj) != "" { | |
return true, nil | |
} |
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.
Maybe we introduce a helper function isManagedByKueue
, and do both checks?
if parent managed by Kueue then
return false
else if hasQueueName
return true
return false
Sorry for the comment, in retrospect, I think the release note is good. Maybe we can just slightly tweak it:
|
/hold cancel |
c5c4816
to
4c08c7b
Compare
4c08c7b
to
4f28c50
Compare
4f28c50
to
7caaf22
Compare
/lgtm |
LGTM label has been added. Git tree hash: 260200ab3eb9b81a741abd864823b96c1d196e33
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mbobrovskyi, 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 |
/cherry-pick release-0.10 release-0.9 |
@mimowo: once the present PR merges, I will cherry-pick it on top of In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@mimowo: new pull request created: #3997 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/release-note-edit
|
…s without queue-name. (#3998) * Allow to change replicas without queue-name. * Allow to change replicas when owner managed by Kueue. * Skip test cases that requires AppWrapper.
…s without queue-name. (#3999) * Allow to change replicas without queue-name. * Allow to change replicas when owner managed by Kueue.
…s-sigs#3991) * [StatefulSet] Allow to change replicas without queue-name. * Allow to change replicas when owner managed by Kueue.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Allow to change replicas in StatefulSet without queue-name.
Which issue(s) this PR fixes:
Fixes #3996
Special notes for your reviewer:
Does this PR introduce a user-facing change?