Commit graph

56665 commits

Author SHA1 Message Date
kubernetes-prow[bot]
1b4e48f521
Merge pull request #140370 from michaelasp/policyMemIdentical
Policy: Update PodDisruptionBudget/PolicyEviction to be Memory Identical
2026-07-15 22:57:28 +00:00
Kunalbehbud
3bd2928d66
pkg/apis/core: allow uint32 Linux UIDs in container status (#138574)
* pkg/apis/core: allow unsigned 32-bit Linux UIDs

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* apimachinery: fix UID validation on 32-bit platforms

Format UID validation range errors with int64 bounds so accepting Linux UIDs
up to MaxUint32 does not overflow int on 32-bit typecheck targets.

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* pkg/apis/core: limit uint32 UID validation to pod status

Keep pod spec and kubelet image user validation on the existing int32 UID
range, and only accept the full Linux uint32 UID range for container status
user fields.

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>

* pkg/apis/core: inline container status UID range check

Per review, inline the uint32 UID range check directly in
validateLinuxContainerUser and drop the generic-sounding
isValidLinuxContainerUserID helper (and its constants), so the range
that is wider than runAsUser can only ever be applied to container
status validation.

* pkg/apis/core: inline linux user validation into validateContainerStatusUsers

Per review, inline the linux container-user checks directly into
validateContainerStatusUsers and remove the validateLinuxContainerUser
helper, so nothing other than container status validation can reach the
wider-than-runAsUser UID range.

---------

Signed-off-by: Kunalbehbud <121988281+Kunalbehbud@users.noreply.github.com>
2026-07-15 20:53:22 +00:00
kubernetes-prow[bot]
9fc098b4ab
Merge pull request #140478 from nojnhuh/sched-flush-pending-pg-members
scheduler: flush pending PodGroup members after others have been assumed
2026-07-15 17:11:35 +00:00
kubernetes-prow[bot]
da4856b2aa
Merge pull request #137150 from KevinTMtz/pod-level-empty-resources-handling
[PodLevelResources] Fix handling of empty pod-level resources
2026-07-15 15:29:20 +00:00
kubernetes-prow[bot]
d5b7de1730
Merge pull request #140590 from Argh4k/nnn-small-fix
Use NNN from pod group preemption for all pods from pod group
2026-07-15 11:17:28 +00:00
kubernetes-prow[bot]
613c65425e
Merge pull request #140359 from ania-borowiec/validate_matching_preemption_policy
KEP-5710: Validate matching preemption policy across all pods when scheduling pod groups [WAS]
2026-07-15 09:33:18 +00:00
Maciej Wyrzuc
5a45afcd8a Use NNN from pod group preemption for all pods from pod group 2026-07-15 08:28:17 +00:00
Ania Borowiec
4de11066bd
Validate matching preemption policy across all pods when scheduling pod groups 2026-07-15 08:26:49 +00:00
kubernetes-prow[bot]
e3531b8e83
Merge pull request #140559 from BenTheElder/manifest-based-admission-beta
Promote ManifestBasedAdmissionControlConfig to beta
2026-07-15 01:57:23 +00:00
Kevin Torres
eff8673537 Fix handling of empty pod-level resources 2026-07-14 23:34:53 +00:00
kubernetes-prow[bot]
fb41d79cae
Merge pull request #140047 from natasha41575/ippr-bug
fix: overestimation of the pod's resource footprint for multi-container pods undergoing a resize
2026-07-14 23:11:18 +00:00
kubernetes-prow[bot]
3c6939d454
Merge pull request #134936 from tallclair/qos
Clean up ComputePodQOS functions
2026-07-14 21:41:17 +00:00
kubernetes-prow[bot]
be72160dfd
Merge pull request #140380 from yongruilin/dv-ifenabled-not-silent
Surface undeclared declarative-validation options as errors instead of silently disabling
2026-07-14 20:29:18 +00:00
Natasha Sarkar
9d1c3c2259 fix: compute aggregate requests from max of sums to prevent resource inflation for resize 2026-07-14 19:49:34 +00:00
kubernetes-prow[bot]
3c94eaa060
Merge pull request #140019 from BenTheElder/admission-control-config-beta
Implement Exclusion of Virtual Resources from Admission Webhooks
2026-07-14 19:41:16 +00:00
kubernetes-prow[bot]
efbd35f9fb
Merge pull request #140546 from jpbetz/patch-12
Add jpbetz to pkg/registry OWNERS
2026-07-14 18:49:29 +00:00
kubernetes-prow[bot]
8d49569d06
Merge pull request #140432 from lukaszwojciechowski/add-scaling-exclusive-cpus-checkpoint-tests
Add scaling exclusive cpus checkpoint tests
2026-07-14 17:57:34 +00:00
kubernetes-prow[bot]
1627c17148
Merge pull request #140371 from liyuerich/commentstartstorage
enable commentstart check on storage API group
2026-07-14 17:57:25 +00:00
Benjamin Elder
6dde6d61f8 Promote ManifestBasedAdmissionControlConfig to beta 2026-07-14 10:34:14 -07:00
Benjamin Elder
73ad530e91 Exclude auth/authz virtual resources from admission webhooks 2026-07-14 10:16:42 -07:00
Omer Aplatony
6b94432631
Refactor horizontal test 03 (#140445)
* refactor horizontal tests TestScaleWithOneInvalidMetric

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* refactor horizontal tests TestScaleDownCM

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* refactor horizontal tests TestScaleToZeroBehavior

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* Add a comments about invalid metric type and explicitly mention FG

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

---------

Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-07-14 17:05:20 +00:00
Yongrui Lin
7c3452f8d3 address comments: enum undefined-option check, options doc, test fallback
- enum: check every rule's option so an undefined option always errors, matching IfOption
- operation.Options: note an option can be enabled even when its feature gate is off
- api/testing: fall back to strategy options only when the caller supplied none
2026-07-14 16:43:29 +00:00
Yongrui Lin
caf5bd0b70 declarative validation: declare strategy options as maps
HPA, workload, and PodGroup strategies declare their options as map[string]bool,
and the versioned validation-equivalence sweep is given each strategy's declared
options so referenced options are not treated as undeclared.
2026-07-14 16:43:29 +00:00
kubernetes-prow[bot]
319f3bc1aa
Merge pull request #140312 from ania-borowiec/policy_in_template
KEP-5710: Add PreemptionPolicy to PodGroupTemplate [WAS]
2026-07-14 16:05:25 +00:00
kubernetes-prow[bot]
f4180fb480
Merge pull request #140538 from swatisehgal/minor-review-fixes
node: cpumanager: follow-up cleanup for align-by-socket review comments
2026-07-14 15:13:25 +00:00
Joe Betz
ceea6fdb5d
Add jpbetz to pkg/registry OWNERS
Been a reviewer of this for a long time.

Also, API reviewer related changes often touch these files so it's pragmatic for me to have approval.
2026-07-14 10:23:34 -04:00
kubernetes-prow[bot]
b1206c6063
Merge pull request #140430 from lukaszwojciechowski/dra-goroutine-leak
Fix DRA test flake caused by goroutine leak racing with TempDir cleanup
2026-07-14 13:49:28 +00:00
kubernetes-prow[bot]
22a8afd01f
Merge pull request #140085 from Jefftree/enable-etcd-rangestream-default
Enable EtcdRangeStream feature gate by default
2026-07-14 13:49:20 +00:00
Lukasz Wojciechowski
73cd37dbfb Test checkpoint state with InPlacePodVerticalScalingExclusiveCPUs
Extend TestCheckpointStateRestore and TestCheckpointStateStore to cover
the InPlacePodVerticalScalingExclusiveCPUs feature gate and the
baselines field in checkpoint serialization. Existing test cases
are split into all feature gate combinations, and new cases verify
that baselines are correctly stored and restored when the feature gate
is enabled.

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
2026-07-14 14:40:01 +02:00
kubernetes-prow[bot]
1425224d04
Merge pull request #140314 from esotsal/5554-3-state-checkpoint
[FG: InPlacePodVerticalScalingExclusiveCPUs] Add state management to support resize in checkpoint v4
2026-07-14 12:37:20 +00:00
Swati Sehgal
5621371282 node: cpumanager: clarify distribution after bestCombo selection
Add a clarifying comment in the NUMA distributed allocation path
that this distribution adjustment runs after bestCombo selection
(including alignBySocket handling), and only ensures we do not
request more CPUs from a selected NUMA node than it can provide.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-14 13:22:00 +01:00
Swati Sehgal
c0b38bd561 node: cpumanager: fix AlignBySocket typo in tests
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-14 13:22:00 +01:00
kubernetes-prow[bot]
96fcf5ae3f
Merge pull request #139778 from swatisehgal/bugfix-114642
node: cpumanager: consider align-by-socket when distribute-cpus-across-numa is enabled
2026-07-14 11:49:18 +00:00
kubernetes-prow[bot]
359f8cdb56
Merge pull request #140253 from dpacgdm/fix/scheduler-handleSchedulingFailure-data-race
scheduler: avoid data race when requeueing failed pods
2026-07-14 10:51:15 +00:00
kubernetes-prow[bot]
6445e58ca7
Merge pull request #140440 from UditDewan/fix-dra-test-uid-error
Fix unformatted UID in dynamicresources test error message
2026-07-14 08:52:36 +00:00
kubernetes-prow[bot]
c9309422a2
Merge pull request #140373 from michaelasp/admissionMemIdentical
admissionregistration: enable fast cast for policies and bindings
2026-07-14 08:02:29 +00:00
kubernetes-prow[bot]
3358c59de7
Merge pull request #138455 from tallclair/kubelet-synctest-speedup
Kubelet synctest speedup
2026-07-13 21:20:19 +00:00
Sotiris Salloumis
a23535bee6 Add state management to support resize in checkpoint v4
Container-level CPU assignments recorded at admission time, prior to any resize
is required for in-place vertical scaling exclusive CPUs.

This commits stores this in Baseline and in Baselines for all containers.
2026-07-13 22:05:12 +02:00
Swati Sehgal
c1abe5b644 node: cpumanager: simplify socket-aware NUMA scoring branch
Refactor the NUMA combo selection path to compute socket
locality and comparison intent with intermediate variables
before updating the best candidate. This keeps same-socket
preference behavior unchanged while making the decision flow
more readable.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Swati Sehgal
61e6efd0b2 Fix unittest.
Co-authored-by: Ruquan Zhao <zhaoruquan233@gmail.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Swati Sehgal
1692b89d30 Add testcases when both policy options enabled
With both AlignBySocket and DistributeCPUsAcrossNUMA
policy options enabled, change the calculation of
"distribution" when allocate CPUs across NUMA.

Co-authored-by: Ruquan Zhao <zhaoruquan233@gmail.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Swati Sehgal
1d00ad285c Add existing silicon and unittest.
Co-authored-by: Ruquan Zhao <zhaoruquan233@gmail.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Swati Sehgal
63df562b88 Consider option alignBySocket while DistrubuteCPUsAcrossNUMA
Co-authored-by: Ruquan Zhao <zhaoruquan233@gmail.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Swati Sehgal
1c29232ede node: cpumanager: plumb alignBySocket through NUMADistributed
Adapt takeByTopologyNUMADistributed for contextual logging and CPU sorting
strategy APIs added since PR 118068, so the original commits can apply cleanly.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2026-07-13 11:32:42 +01:00
Jon Huhn
05ab37de93 scheduler: flush pending PodGroup members after others have been assumed 2026-07-12 12:58:02 -05:00
Lukasz Wojciechowski
596343ca2b Fix DRA test flake caused by goroutine leak racing with TempDir cleanup
With ResourceHealthStatus enabled (Beta, default on since 1.36),
RegisterPlugin spawns a goroutine that runs WatchResources stream and
writes to healthInfoCache's state file in the manager's state directory.

Tests called defer cancel() on the context but never DRAPluginManager.Stop()
(which does wg.Wait()), so the goroutine could still be writing to
t.TempDir() when the test framework's RemoveAll cleanup ran, causing:

  TempDir RemoveAll cleanup: unlinkat: directory not empty

Add Manager.Stop() that delegates to DRAPluginManager.Stop() and call
defer manager.Stop() in all tests that create a Manager instance.
2026-07-12 03:00:19 +02:00
Jon Huhn
22dd4f8b88 resourceclaim controller: update unit test names 2026-07-11 12:56:55 -05:00
Jon Huhn
8d048bba8b resourceclaim controller: skip retrying some errors
The resourceclaim controller's `syncHandler` can now return an error
wrapped in the `nonRetryableError` type to signal that the item should
not be retried.

Currently, this is used when the controller reaches a state where it
must either be restarted with different features enabled where it will
completely resync, or the Pod or PodGroup must be recreated which will
invoke the event handlers.
2026-07-11 12:56:55 -05:00
Jon Huhn
83fabed841 resourceclaim controller: safer behavior when DRAWorkloadResourceClaims is disabled
The resourceclaim controller no longer creates a per-Pod ResourceClaim
when the DRAWorkloadResourceClaims feature is disabled, but *would have*
created a per-PodGroup ResourceClaim *if* the feature *was* enabled.
Instead of creating a per-Pod ResourceClaim, the controller returns an
error.

In this scenario, the claim was meant to be made by the PodGroup, so
replicating that claim for every Pod will consume many more resources
than intended.

For a ResourceClaim to be successfully generated for the PodGroup,
restart kube-controller-manager with the DRAWorkloadResourceClaims
feature enabled. For a ResourceClaim to be successfully generated for
each individual Pod, recreate the PodGroup without the claim.
2026-07-11 12:56:55 -05:00
Jon Huhn
b0865163ed resourceclaim controller: test all feature combinations 2026-07-11 12:56:55 -05:00