Commit Graph

134560 Commits

Author SHA1 Message Date
Tim Allclair
fa1dfe4181 Clean up config source update merging: remove code handling unused
update types.
2026-01-06 14:59:48 -08:00
Matteo Fari
a1d638ea11 Enable nomaps rule for Kube API Linter (#134852)
* tested how many errors

* added exceptions

* added scoped exceptions per API group

* added struct.field specification

* improved regex match and included core and resources with the new struct.field format

* condensed exceptions using regex as requested

* fixed the scope kal nomaps exceptions to match existing fields
2026-01-06 23:59:39 +05:30
Kubernetes Prow Robot
4c5746c0bc Merge pull request #134680 from JoelSpeed/enable-kal-integers
Enable integers rule for Kube API Linter
2026-01-06 22:39:39 +05:30
Kubernetes Prow Robot
3edae6c1c4 Merge pull request #136053 from tchap/kcm-leader-election-thread-mgmt
leasecandidate: Improve goroutine management
2026-01-06 20:59:08 +05:30
Ondra Kupka
498896ec42 leasecandidate: Improve goroutine management
Make sure all goroutines are terminated when Run returns.
2026-01-06 10:43:05 +01:00
Kubernetes Prow Robot
76c562be4a Merge pull request #135611 from Karthik-K-N/fix-device-taint
Fix flake TestDeviceTaintRule test
2026-01-06 14:45:08 +05:30
Kubernetes Prow Robot
f36be36c76 Merge pull request #136037 from pravk03/ndf-fix
Prevent nil pointer dereference in HandlePodUpdates
2026-01-06 11:16:38 +05:30
Karthik Bhat
cd7d35fa3d Fix flake TestDeviceTaintRule test by adjusting event hanlder status update logic
Co-authored-by: Pohly <patrick.ohly@intel.com>
2026-01-06 11:00:06 +05:30
Kubernetes Prow Robot
0f89b13c79 Merge pull request #135227 from hime/master
Inverting DRAOperationsDuration metric by inverting 'is_error' label.
2026-01-06 05:24:38 +05:30
Praveen Krishna
1ff74821f9 Fix: Prevent nil pointer dereference in HandlePodUpdates
In HandlePodUpdates, oldPod is nil for a mirror pod. Adding a nil check to prevent panic when the NodeDeclaredFeatures feature gate is enabled.
2026-01-05 20:41:45 +00:00
Kubernetes Prow Robot
b2ac9e206f Merge pull request #130231 from Barakmor1/updateimagelocality
Update ImageLocality plugin to account ImageVolume images
2026-01-05 12:28:37 +05:30
Kubernetes Prow Robot
caf5cdc58b Merge pull request #135148 from neolit123/1.35-add-deprecated-api-flag-to-config-validate
kubeadm: add --allow-deprecated-api to 'config validate'
2026-01-04 18:30:37 +05:30
Kubernetes Prow Robot
bf0e7b694f Merge pull request #135856 from natasha41575/static_pod_check
[InPlacePodVerticalScaling] remove ineffectual static pod feasibility check
2025-12-31 07:18:34 +05:30
Kubernetes Prow Robot
d1c1efea52 Merge pull request #135976 from pohly/dra-scheduler-plugin-after-claim-change-fix
DRA scheduler: fix unit test flakes
2025-12-31 01:02:34 +05:30
Natasha Sarkar
9c7a83d30f remove ineffectual static pod check for resize 2025-12-30 17:35:32 +00:00
Kubernetes Prow Robot
a1f6c4171f Merge pull request #135971 from DEVMANISHOFFL/fix-kubeadm-reset-crash
fix(kubeadm): prevent nil pointer panic in reset command
2025-12-30 21:56:35 +05:30
Patrick Ohly
dfa6aa22b2 DRA scheduler: fix unit test flakes
Test_isSchedulableAfterClaimChange was sensitive to system load because of the
arbitrary delay when waiting for the assume cache to catch up. Running inside
a synctest bubble avoids this. While at it, the unit tests get converted
to ktesting (nicer failure output, no extra indention needed for
tCtx.SyncTest).

TestPlugin/prebind-fail-with-binding-timeout relied on setting up a claim with
certain time stamps and then getting that test case tested within a certain
real-world time window. It's surprising that this didn't flake more often
because test execution order is random. Now the time stamp gets set right
before the test case is about to be tested. Conversion to a synctest would
be nicer, but synctests cannot have sub-tests, which are used here to track
where log output and failures come from within the larger test case.

Inside the plugin itself some log output gets added to explain why a claim is
unavailable on a node in case of a binding timeout or error during Filter.
2025-12-30 11:45:02 +01:00
Kubernetes Prow Robot
3226fe520d Merge pull request #135948 from pohly/dra-scheduler-resource-plugin-unit-test-fix
DRA extended resources: fix flake in unit tests
2025-12-30 16:12:35 +05:30
devmanishofficial
ecf7e6d41f fix(kubeadm): prevent nil pointer panic in reset command
Signed-off-by: devmanishofficial <devmanishofficial@gmail.com>
2025-12-30 15:53:10 +05:30
Kubernetes Prow Robot
f1dbece0a4 Merge pull request #135974 from ErikJiang/fix/init-plan-slice-init
Optimize slice initialization in kubeadm
2025-12-30 15:12:34 +05:30
bo.jiang
e0d4e7075b Optimize slice initialization in kubeadm
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2025-12-30 16:42:36 +08:00
Kubernetes Prow Robot
2a3a6605ac Merge pull request #135330 from sujalshah-bit/fix-mem-leak
scheduler: Fix memory leak in scheduler cache
2025-12-29 15:56:34 +05:30
Kubernetes Prow Robot
8d1296caf2 Merge pull request #135912 from pohly/scheduler-plugin-test-data-race
scheduler: plugin test DATA RACE fix
2025-12-29 14:46:35 +05:30
Kubernetes Prow Robot
dd838ccf07 Merge pull request #135954 from pohly/hack-test-features-script-removal
hack: remove list-feature-tests.sh
2025-12-28 23:54:33 +05:30
Kubernetes Prow Robot
ed4b5ee317 Merge pull request #134350 from macsko/add_scheduling_duration_collector
Add scheduling duration collector to scheduler_perf
2025-12-28 05:50:33 +05:30
Patrick Ohly
57b65a2509 hack: remove list-feature-tests.sh
The script is broken because it relies on grepping the source code.
This has always been fragile (currently it finds the search term
in comments) and stopped working years ago when changing how tests
are labeled.

Instead of fixing the script let's remove it because it's clearly unused.
2025-12-27 11:15:24 +01:00
Patrick Ohly
7a4d650125 DRA extended resources: fix flake in unit tests
The tests assumed that instantiating a DRAManager followed by
informerFactory.WaitForCacheSync would be enough to have the manager
up-to-date, but that's not correct: the test only waits for informer *caches*
to be synced, but syncing *event handlers* like the one in the manager may
still be going on. The flake rate is low, though:

    $ GOPATH/bin/stress -p 256 ./noderesources.test
    5s: 0 runs so far, 0 failures, 256 active
    10s: 256 runs so far, 0 failures, 256 active
    15s: 256 runs so far, 0 failures, 256 active
    20s: 512 runs so far, 0 failures, 256 active
    25s: 567 runs so far, 0 failures, 256 active
    30s: 771 runs so far, 0 failures, 256 active

    /tmp/go-stress-20251226T181044-974980161
    --- FAIL: TestCalculateResourceAllocatableRequest (0.81s)
        --- FAIL: TestCalculateResourceAllocatableRequest/DRA-backed-resource-with-shared-device-allocation (0.00s)
            extendedresourcecache.go:197: I1226 18:11:14.431337] Updated extended resource cache for explicit mapping extendedResource="extended.resource.dra.io/something" deviceClass="device-class-name"
            extendedresourcecache.go:204: I1226 18:11:14.431380] Updated extended resource cache for default mapping extendedResource="deviceclass.resource.kubernetes.io/device-class-name" deviceClass="device-class-name"
            extendedresourcecache.go:220: I1226 18:11:14.431394] Updated device class mapping deviceClass="device-class-name" extendedResource="extended.resource.dra.io/something"
            resource_allocation_test.go:595: Expected requested=2, but got requested=1
    FAIL

It becomes higher when changing WaitForCacheSync such that it doesn't poll and
therefore returns more promptly, which is where this flake was first observed.

The fix is to run the test in a syntest bubble where Wait can be used to wait
for all background activity, including event handling, to be finished before
proceeding with the test.

synctest is less forgiving about lingering goroutines. A synctest bubble must
wait for gouroutines to stop, which in this case means that there has to be
a way to wait for the metric recorder shutdown. Event handlers have to be
removed.

This could be done with plain Go, but here test/utils/ktesting is used instead
because it offers some advantages:
- less boilerplate code
- automatic cancellation of the context (i.e. less manual context.WithCancel)
- tCtx.SyncTest is a direct substitute for t.Run, which avoids re-indenting
  sub-tests. synctest itself needs another anonymous function, which makes
  the line too long and forced re-indention:
     t.Run(... func(...) {
         synctest.Test(... func() {
         })
     })

For the sake of consistency all tests get updated.

While at it, some code gets improved:

- t.Fatal(err) is not a good way to report an error because
  there is no additional markup in the test output that indicates
  that there was an unexpected error. It just logs err.Error(),
  which might not be very informative and/or obvious.
- newTestDRAManager aborts in case of a failure instead of
  returning an error.
2025-12-27 09:47:56 +01:00
Kubernetes Prow Robot
3c2e339be8 Merge pull request #135946 from borg-land/bump-gcp-ccm
bump gcp ccm to v35
2025-12-27 04:18:32 +05:30
Kubernetes Prow Robot
5023ec504c Merge pull request #135933 from pohly/dra-scheduler-unit-test-flakes
DRA ExtendedResourceCache: avoid risk of flakes
2025-12-27 01:48:32 +05:30
Kubernetes Prow Robot
8db962ba5a Merge pull request #135947 from michaelasp/UpdateKubeBinary
Update DefaultKubeBinaryVersion to 1.36
2025-12-27 00:18:32 +05:30
Michael Aspinwall
c2805d38c4 Update DefaultKubeBinaryVersion to 1.36 2025-12-26 17:06:32 +00:00
Kubernetes Prow Robot
d719bc771f Merge pull request #135938 from pohly/hack-verify-featuregates-output
hack/verify-featuregates.sh: print failure information to stderr
2025-12-26 19:56:32 +05:30
upodroid
2514b1df49 bump gcp ccm to v35 2025-12-26 13:39:58 +03:00
Patrick Ohly
ad012f63f7 hack/verify-featuregates.sh: print failure information to stderr
Verify scripts are run such that stderr is captured and included in the JUnit
files. Stdout is not. Therefore the instructions in case of a failure where
only visible by searching the entire job log file, but not in the Prow summary.
2025-12-26 10:37:10 +01:00
Patrick Ohly
41c598c4df DRA ExtendedResourceCache: avoid risk of flakes
The unit test flaked at least once so far in the CI. Can be reproduced
locally by running many instances of the test in parallel.

There were two potential root causes:
- The watch must be set up completely before creating objects (a fake
  client-go limitation).
- The one second timeout might be too small on a loaded system.

By running the tests in a synctest bubble with synctest.Wait calls at
the right places both problems are avoided. As a welcome side effect
the test also completes faster.

Before:

    $ go test k8s.io/dynamic-resource-allocation/deviceclass/extendedresourcecache
    ok  	k8s.io/dynamic-resource-allocation/deviceclass/extendedresourcecache	9.300s

    $ stress -p 512 ./extendedresourcecache.test
    5s: 0 runs so far, 0 failures, 512 active
    10s: 8 runs so far, 0 failures, 512 active

    /tmp/go-stress-20251225T195231-2875181701
    --- FAIL: TestExtendedResourceCache (9.14s)
        extendedresourcecache_test.go:234: Expected to find device class 'gpu-class' for 'example.com/gpu', got nil
        extendedresourcecache_test.go:241: Expected to find device class 'fpga-class' for 'deviceclass.resource.kubernetes.io/fpga-class', got nil
        extendedresourcecache_test.go:247: Expected default mapping for gpu-class
        extendedresourcecache.go:197: I1225 19:52:36.332170] Updated extended resource cache for explicit mapping extendedResource="example.com/gpu" deviceClass="gpu-class-3"
        extendedresourcecache.go:204: I1225 19:52:36.332216] Updated extended resource cache for default mapping extendedResource="deviceclass.resource.kubernetes.io/gpu-class-3" deviceClass="gpu-class-3"
        extendedresourcecache.go:220: I1225 19:52:36.332245] Updated device class mapping deviceClass="gpu-class-3" extendedResource="example.com/gpu"
        extendedresourcecache_test.go:260: Expected to find device class 'gpu-class' for 'example.com/gpu', got &DeviceClass{ObjectMeta:{gpu-class-3      0 2025-12-24 19:52:35.32560833 +0100 CET m=-86396.691266715 <nil> <nil> map[] map[] [] [] [{unknown Update resource.k8s.io/v1 2025-12-25 18:52:36.332067439 +0000 UTC FieldsV1 {"f:spec":{"f:extendedResourceName":{}}} }]},Spec:DeviceClassSpec{Selectors:[]DeviceSelector{},Config:[]DeviceClassConfiguration{},ExtendedResourceName:*example.com/gpu,},}
        extendedresourcecache.go:197: I1225 19:52:37.336135] Updated extended resource cache for explicit mapping extendedResource="example.com/gpu" deviceClass="gpu-class-4"
        extendedresourcecache.go:204: I1225 19:52:37.336169] Updated extended resource cache for default mapping extendedResource="deviceclass.resource.kubernetes.io/gpu-class-4" deviceClass="gpu-class-4"
        extendedresourcecache.go:220: I1225 19:52:37.336192] Updated device class mapping deviceClass="gpu-class-4" extendedResource="example.com/gpu"
        extendedresourcecache.go:197: I1225 19:52:38.340121] Updated extended resource cache for explicit mapping extendedResource="example

After:

    ok  	k8s.io/dynamic-resource-allocation/deviceclass/extendedresourcecache	0.064s
    ...
    2m0s: 7063 runs so far, 0 failures, 512 active
2025-12-25 19:59:20 +01:00
Kubernetes Prow Robot
15673d04e3 Merge pull request #135918 from MarcosDaNight/fix/kubectl-exec-panic
kubectl: Fix panic in exec terminal size queue
2025-12-24 12:52:31 +05:30
Marcos Guillermo
5f67574044 kubectl: Fix panic in exec terminal size queue
Check if delegate is nil before calling Next() in terminalSizeQueueAdapter
to prevent a nil pointer dereference.
2025-12-24 00:21:56 -03:00
Patrick Ohly
f758d0850b scheduler: plugin test DATA RACE fix
Reading numPreFilterCalled races with writing it in the scheduler, at least as
far as the data race detector is concerned. That the test waits for pod
scheduling is too indirect. enqueuePlugin.called has the same problem,
but hasn't triggered the race detector (yet).

We need to protect against concurrent access. The easiest way to enforce that
is via atomic.Int64. In contrast to a mutex it is impossible to use it wrong.

Shutting down the scheduler first was also tried, but didn't work out because
"teardown" does more than just stopping the scheduler, it also cancels a
context that is needed during test shutdown.
2025-12-23 19:13:53 +01:00
Kubernetes Prow Robot
1c30a75a22 Merge pull request #135903 from macsko/disable_async_api_calls_135
Disable SchedulerAsyncAPICalls feature gate due to performance issues
2025-12-23 20:22:34 +05:30
Maciej Skoczeń
4954c5e3b0 Disable SchedulerAsyncAPICalls in v1.35 due to performance issues 2025-12-23 12:34:47 +00:00
Kubernetes Prow Robot
d04610bbfb Merge pull request #135886 from sonikaarora/fix-typos-kubectl-comments
Fix typos kubectl comments
2025-12-23 13:40:32 +05:30
Kubernetes Prow Robot
9bd81471eb Merge pull request #135805 from humblec/etcd-3.6.7
etcd: Update etcd to v3.6.7
2025-12-22 16:28:39 -08:00
Kubernetes Prow Robot
6f92c01979 Merge pull request #135391 from jpbetz/smd-6_3_1
Bump structured-merge-diff to pick up flake fix and bug fixes
2025-12-22 16:28:32 -08:00
Kubernetes Prow Robot
c255acea91 Merge pull request #135859 from cheftako/anp-release
Update KAS apiserver network proxy to v0.34
2025-12-22 15:34:32 -08:00
Walter Fender
c8f8bb83d1 Update KAS apiserver network proxy to v0.34
Update konnectivity network proxy to v0.34.0. Includes bug fixes such as memory-leak in http-connect mode, stale count fix and updates to match/support kubernetes version 1.34
(https://github.com/kubernetes-sigs/apiserver-network-proxy/commits/v0.34.0)
2025-12-22 17:42:53 +00:00
Kubernetes Prow Robot
9720186a46 Merge pull request #135862 from grandeit/fix-race-scheduling-queue
Fix data race in PriorityQueue.UnschedulablePods()
2025-12-22 09:08:40 -08:00
Kubernetes Prow Robot
9f68013b1e Merge pull request #135501 from shivamwayal37/fix/113359-win-snapshot-fs-size
Fix: Use Get-Volume for Windows snapshot size verification
2025-12-22 09:08:31 -08:00
Sonika Arora
7b6fbc9677 Fix typos in kubectl package comments
- Fix 'Prefrences' -> 'Preferences' in kuberc.go
- Fix 'formating' -> 'formatting' in humanreadable_flags.go
2025-12-21 23:24:02 -08:00
Kubernetes Prow Robot
3bde8d89a4 Merge pull request #135807 from carlory/fix-kubeadm-3108
kubeadm: remove --pod-infra-container-image flag from the unwantedFlags list
2025-12-21 20:32:30 -08:00
Kubernetes Prow Robot
5151f58ef0 Merge pull request #135869 from dims/cleanup/remove-orphaned-nsswitch-conf
Remove orphaned build/nsswitch.conf
2025-12-21 07:04:31 -08:00