Skip to content

Automated cherry pick of #13279: Reject leaderWorkerTemplate.size updates on managed LeaderWorkerSets - #13809

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:release-0.19from
epam:automated-cherry-pick-of-#13279-upstream-release-0.19
Aug 4, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:release-0.19from
epam:automated-cherry-pick-of-#13279-upstream-release-0.19

Conversation

@ivnovakov

Copy link
Copy Markdown
Contributor

Cherry pick of #13279 on release-0.19.

#13279: Reject leaderWorkerTemplate.size updates on managed LeaderWorkerSets

For details on the cherry pick process, see the cherry pick requests page.

What type of PR is this?

/kind bug

/area release

LeaderWorkerSet: Fixed a quota bypass where raising `spec.leaderWorkerTemplate.size` on an already-admitted, Kueue-managed LeaderWorkerSet ran more pods per group than the reserved quota covered. `spec.leaderWorkerTemplate.size` is now immutable while the LeaderWorkerSet is managed by Kueue, behind the new `LWSImmutableGroupSize` feature gate (Beta, enabled by default). `spec.replicas` stays mutable.

ACTION REQUIRED: If you change `spec.leaderWorkerTemplate.size` on a Kueue-managed LeaderWorkerSet, recreate it at the new size instead, or disable the `LWSImmutableGroupSize` feature gate to keep the previous behavior, which also restores the quota bypass.

When a LeaderWorkerSet is managed by Kueue, its validating webhook keeps
the leader and worker pod templates immutable on update, but
spec.leaderWorkerTemplate.size is not covered, since it sits outside the
PodTemplateSpec. A group's admitted quota is the PodSet Count, which
podSets() derives from size. Existing groups' Workloads go to toUpdate
in filterWorkloads, and updateWorkload never recomputes their PodSets,
so raising size on an admitted LeaderWorkerSet grows the pods per group
without accounting for the added quota. The upstream controller creates
the extra pods and the pod controller ungates them, so a tenant can
create a small LeaderWorkerSet, let it get admitted, then raise size to
run more pods than the ClusterQueue allows.

Make spec.leaderWorkerTemplate.size immutable while the LeaderWorkerSet
is managed by Kueue, with apivalidation.ValidateImmutableField in the
same block that already validates the pod templates as immutable.
replicas stays mutable, since each replica is a separate Workload that
re-admits through quota.

Put the check behind LWSImmutableGroupSize, Beta and on by default
since 0.20. Changing size before anything is admitted, and scaling
down, are arguably valid mutations, so operators who need either can
opt out and accept the previous behavior until Kueue can re-admit a
resized group through quota.
@kubernetes-prow kubernetes-prow Bot added the release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. label Aug 4, 2026
@kubernetes-prow kubernetes-prow Bot added this to the v0.19 milestone Aug 4, 2026
@kubernetes-prow kubernetes-prow Bot added kind/bug Categorizes issue or PR as related to a bug. area/release Issues or PRs related to the release process. labels Aug 4, 2026
@netlify

netlify Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 3d58eab
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/6a71e64d8f4aeb00082340a7
😎 Deploy Preview https://deploy-preview-13809--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c692d984-ec4c-44b8-bdcd-5c700eaff9b6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 4, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from PBundyra and kshalot August 4, 2026 13:17
@mimowo

mimowo commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2026
@kubernetes-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: f5dff912aa930ac7d9fcf2203a92c63884a55073

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivnovakov, mimowo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 691daa7 into kubernetes-sigs:release-0.19 Aug 4, 2026
54 of 55 checks passed
@mbobrovskyi
mbobrovskyi deleted the automated-cherry-pick-of-#13279-upstream-release-0.19 branch August 6, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release Issues or PRs related to the release process. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants