Repository navigation
Automated cherry pick of #15279: Resize the StatefulSet workload when scaling up from zero to a different size - #15302
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
|
Thank you for cherry-pick! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 7d689c31191d56a968a354282f05382b850d2350 |
There was a problem hiding this comment.
🟢 Approval recommended
The controller change is narrowly scoped to OnHold scale-up handling and is covered by a targeted integration test for the reported bug scenario.
Pull request overview
Cherry-picks the fix from #15279 onto release-0.19 to ensure StatefulSet-backed Workloads are resized correctly when a StatefulSet is scaled down to zero and then scaled back up to a different replica count, preventing incorrect pod-count quota accounting/admission.
Changes:
- Resync
Workload.spec.podSets[].countwhen clearing the OnHold state so re-admission uses the current StatefulSet replica count. - Add integration coverage for StatefulSet pod gating behavior during rollouts (current vs update revision).
- Add an integration test validating Workload resize behavior when scaling 0 → N with a different N than the original.
File summaries
| File | Description |
|---|---|
pkg/controller/jobs/statefulset/statefulset_reconciler.go |
Updates reconcile flow to apply desired PodSet counts before clearing OnHold, fixing stale Workload sizing on re-admission. |
test/integration/singlecluster/controller/jobs/statefulset/statefulset_controller_test.go |
Adds integration tests for rollout gating behavior and for resizing Workload pod count after a 0 → N scale-up to a different size. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| g.Expect(k8sClient.Get(ctx, wlKey, wl)).Should(gomega.Succeed()) | ||
| cond := findWorkloadCondition(wl, kueue.WorkloadQuotaReserved) | ||
| g.Expect(cond).ShouldNot(gomega.BeNil()) | ||
| g.Expect(cond.Reason).Should(gomega.Equal(kueue.WorkloadOnHold)) | ||
| }, util.LongTimeout, util.Interval).Should(gomega.Succeed()) |
…ent size Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
655b27e to
a957235
Compare
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 1a4f3472fabc4da904ca03334725c239e51d4bfc |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mimowo, sohankunkerkar The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
dd5243d
into
kubernetes-sigs:release-0.19
Cherry pick of #15279 on release-0.19.
#15279: Resize the StatefulSet workload when scaling up from zero to a different size
For details on the cherry pick process, see the cherry pick requests page.
What type of PR is this?
/kind bug