Commit Graph

131681 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
b3d00a026d Merge pull request #132756 from ylink-lfs/ci/redis_removal
ci: redis removal for e2e test dependency simplicity
2025-07-24 09:38:42 -07:00
Kubernetes Prow Robot
65d00aaa9d Merge pull request #132593 from koba1t/update/kubectl-in-kustomize_to_v5.7.0
Update kubectl kustomize to kustomize/v5.7.1
2025-07-24 09:38:34 -07:00
Kubernetes Prow Robot
a11bc701e8 Merge pull request #132457 from ania-borowiec/depends_on_cluster_move_podinfo
Moving Scheduler interfaces to staging: Move PodInfo and NodeInfo interfaces (together with related types) to staging repo, leaving internal implementation in kubernetes/kubernetes/pkg/scheduler
2025-07-24 09:38:27 -07:00
Kubernetes Prow Robot
d21da29c9e Merge pull request #133170 from ffromani/e2e-node-podres-memmgr
e2e: podresources: disable memory manager integration
2025-07-24 07:56:48 -07:00
Kubernetes Prow Robot
24c896108d Merge pull request #133164 from everpeace/bump-dra-version-in-deviceattribute
Bump DRA API version to "v1" in "deviceattribute" package in "k8s.io/dynamic-resource-allocation" module
2025-07-24 07:56:41 -07:00
Kubernetes Prow Robot
b3e39344ff Merge pull request #132959 from ylink-lfs/test/e2e_named_port_con_case
test: add e2e case for mutating named port
2025-07-24 07:56:34 -07:00
Mayuka Channankaiah
ffe306d679 client-go, kubectl: Replace deprecated ErrWaitTimeout with recommended method (#132718)
* client-go: Replace depracted ErrWaitTimeout with recommended method

* Fix UT and Integration tests

* IT test
2025-07-24 07:56:27 -07:00
Dharmit Shah
cb33accc8f JSON & YAML output for kubectl api-resources (#132604)
* Add JSON & YAML output support for kubectl api-resources

Create a separate `PrintFlags` struct within the apiresources.go file
that handles printing only for `kubetl api-resources` because existing
output formats, i.e., wide and name, are already implemented
independently from HumanReadableFlags and NamePrintFlags.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Use separate printer type for all options

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Unit tests for JSON & YAML outputs

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Separate file for print types

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Move JSON-YAML tests to separate function

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Fix broken unit test

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Unifying JSON & YAML unit test functions

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Fix linter errors

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* PR feedback and linter again

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

---------

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
2025-07-24 06:46:28 -07:00
Ania Borowiec
aecd37e6fb Moving Scheduler interfaces to staging: Move PodInfo and NodeInfo interfaces (together with related types) to staging repo, leaving internal implementation in kubernetes/kubernetes/pkg/scheduler 2025-07-24 12:10:58 +00:00
Kubernetes Prow Robot
f9fde2dfbd Merge pull request #132837 from JoelSpeed/fix-max-elements-x-int-or-string
Fix IntOrString cost estimation when schema has a MaxLength constraint
2025-07-24 04:50:28 -07:00
Shingo Omura
6767d54bba Bump DRA API version to "v1" in "deviceattribute" package in "k8s.io/dynamic-resource-allocation" module 2025-07-24 19:46:51 +09:00
Kubernetes Prow Robot
89a01ec72a Merge pull request #133019 from pohly/dra-scheduler-plugin-owners
DRA scheduler plugin: add pohly as approver
2025-07-24 03:42:33 -07:00
Kubernetes Prow Robot
254a46943a Merge pull request #132706 from pohly/dra-api-v1
DRA API: graduation to GA
2025-07-24 03:42:26 -07:00
Francesco Romani
449763fb11 e2e: podresources: disable memory manager integration
As part of the PR 132028 we added more e2e test coverage to validate
the fix, and check as much as possible there are no regressions.

The issue and the fix become evident largely when inspecting
memory allocation with the Memory Manager static policy enabled.
Quoting the commit message of bc56d0e45a
```
The podresources API List implementation uses the internal data of the
resource managers as source of truth.
Looking at the implementation here:
https://github.com/kubernetes/kubernetes/blob/v1.34.0-alpha.0/pkg/kubelet/apis/podresources/server_v1.go#L60
we take care of syncing the device allocation data before querying the
device manager to return its pod->devices assignment.
This is needed because otherwise the device manager (and all the other
resource managers) would do the cleanup asynchronously, so the `List` call
will return incorrect data.

But we don't do this syncing neither for CPUs or for memory,
so when we report these we will get stale data as the issue #132020 demonstrates.

For CPU manager, we however have the reconcile loop which cleans the stale data periodically.
Turns out this timing interplay was actually the reason the existing issue #119423 seemed fixed
(see: #119423 (comment)).
But it's actually timing. If in the reproducer we set the `cpuManagerReconcilePeriod` to a time
very high (>= 5 minutes), then the issue still reproduces against current master branch
(https://github.com/kubernetes/kubernetes/blob/v1.34.0-alpha.0/test/e2e_node/podresources_test.go#L983).
```

The missing actor here is memory manager. Memory manager has no
reconcile loop (implicit fixing the stale data problem) no explicit
synchronization, so it is the unlucky one which reported stale data,
leading to the eventual understanding of the problem.

For this reason it was (and still is) important to exercise it during
the test.
Turns out the test is however wrong, likely because a hidden dependency
between the test expectations and the lane configuration (notably
machine specs), so we disable the memory manager activation for the time
being, until we figure out a safe way to enable it.

Note this significantly weakens the signal for this specific test.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-07-24 12:35:45 +02:00
Kubernetes Prow Robot
3ba0c944b1 Merge pull request #133119 from bart0sh/PR184-kubelet-DRA-fix-setupFakeGRPCServer
kubelet: DRA: Handle grpc.ErrServerStopped in plugin tests
2025-07-24 02:10:27 -07:00
Patrick Ohly
b768c1d1d5 DRA API: bump storage version to v1beta2
This avoids the overhead for the more complex conversion to v1beta1 and might
make it a bit more realistic to get rid of the v1beta1 eventually.

The expected GVK must be set explicitly because when emulating 1.33,
v1beta1 is the default although the fixed storage version is v1beta2.
2025-07-24 08:33:56 +02:00
Patrick Ohly
24de875ceb DRA: graduate DynamicResourceAllocation feature to GA
It hasn't been on-by-default before, therefore it does not get locked to the
new default on yet. This has some impact on the scheduler configuration
because the plugin is now enabled by default.

Because the feature is now GA, it doesn't need to be a label on E2E tests,
which wouldn't be possible anyway once it gets removed entirely.
2025-07-24 08:33:56 +02:00
Patrick Ohly
d8df1dc1b8 DRA RBAC: fix kube-scheduler bootstrap policy
The pods/finalizer permission can be restricted to just updates because that is
all that matters.

The DeviceTaints rules were under the wrong feature gate check (copy-and-paste)
and must remain disabled when DRA itself becomes enabled.
2025-07-24 08:33:56 +02:00
Patrick Ohly
21d929f599 integration: use --runtime-config-emulation-forward-compatible
Some tests do version emulation and need the DRA feature. In that combination
the --runtime-config-emulation-forward-compatible option is needed to allow
enabling the V1 API although it's only available in 1.34.
2025-07-24 08:33:56 +02:00
Patrick Ohly
5c4f81743c DRA: use v1 API
As before when adding v1beta2, DRA drivers built using the
k8s.io/dynamic-resource-allocation helper packages remain compatible with all
Kubernetes release >= 1.32. The helper code picks whatever API version is
enabled from v1beta1/v1beta2/v1.

However, the control plane now depends on v1, so a cluster configuration where
only v1beta1 or v1beta2 are enabled without the v1 won't work.
2025-07-24 08:33:45 +02:00
Patrick Ohly
cff91579e8 DRA API: v1 registration + tests 2025-07-24 08:30:25 +02:00
Patrick Ohly
4e592f6c14 DRA API: s/v1beta2/v1/ and generated files 2025-07-24 08:30:24 +02:00
Patrick Ohly
1f2f433f76 DRA API: verbatim copy v1beta2 -> v1 2025-07-24 08:30:24 +02:00
Kubernetes Prow Robot
ff657e166b Merge pull request #133159 from ylink-lfs/chore/ptrto_migration
chore: ptrTo util removal with ptr.To
2025-07-23 22:52:39 -07:00
Kubernetes Prow Robot
df696c3189 Merge pull request #132657 from danwinship/drop-bfr
Drop BoundedFrequencyRunner from pkg/util/async
2025-07-23 22:52:32 -07:00
Kubernetes Prow Robot
01c5535387 Merge pull request #133085 from ritazh/DRAAdminAccess_beta
DRAAdminAccess: move to beta
2025-07-23 21:44:34 -07:00
Simran Kaur
c7d6c09683 List available endpoints for kube-apiserver (#132581)
Fix tests and formatting

Use ListedPaths for finding useful endpoints

Fix maps import

Update dependencies

Fix lint

Add option to pass listedpaths

Remove apiserver component check

Install statuz in genericapiserver

Register zpagesfeatures

Fix import order

Avoid adding non-debugging endpoints

Fix tests

Fix tests

fix tests

Sort paths

Sort in-place

Copy paths before sorting

Fix string initialization

Move sorting to later stage

Fix imports
2025-07-23 21:44:27 -07:00
Kubernetes Prow Robot
84df53a2a2 Merge pull request #133150 from rzlink/windsr
Remove Unit Test for WinDSR Feature Gate
2025-07-23 19:57:02 -07:00
Kubernetes Prow Robot
051dd70772 Merge pull request #133149 from ritazh/draadminaccess-test
draadminaccess test make it serial
2025-07-23 19:56:55 -07:00
Kubernetes Prow Robot
48f9786332 Merge pull request #133146 from liggitt/debug-flake
Add flake debugging for admission test
2025-07-23 19:56:47 -07:00
Kubernetes Prow Robot
dd6fa8bafd Merge pull request #133129 from ffromani/podres-get-add-tests
node: podresources: improve test coverage for the `Get` endpoint
2025-07-23 19:56:40 -07:00
Kubernetes Prow Robot
9adc49ffd4 Merge pull request #133046 from toVersus/reject-windows-in-api-server
[PodLevelResources] Add validation for Windows OS
2025-07-23 19:56:33 -07:00
Kubernetes Prow Robot
6ad14ad876 Merge pull request #132991 from danwinship/endpoints-e2e-updates
Endpoints e2e updates for KEP-4974
2025-07-23 19:56:26 -07:00
ylink-lfs
5f4a1aa58c chore: ptrTo util removal with ptr.To 2025-07-24 09:11:09 +08:00
Kubernetes Prow Robot
ca569e152d Merge pull request #132700 from pohly/dra-kubelet-grpc-v1
DRA kubelet: add v1 gRPC
2025-07-23 17:36:26 -07:00
Kubernetes Prow Robot
6ef2215eb7 Merge pull request #132558 from HirazawaUi/Implement-4762
KEP-4762: Allows setting any FQDN as the pod's hostname
2025-07-23 16:26:27 -07:00
Kubernetes Prow Robot
49cd87182c Merge pull request #125271 from tssurya/psa-probe-lifecycle-handler-host-option
Add PSA for blocking `.host` on pod probes
2025-07-23 15:16:27 -07:00
Kubernetes Prow Robot
d195722623 Merge pull request #132121 from atiratree/rs-minReadySeconds
schedule pod availability checks at the correct time in ReplicaSets
2025-07-23 14:04:28 -07:00
Kubernetes Prow Robot
041974709c Merge pull request #132106 from AndrewSirenko/vac-valid
[KEP-3751] Allow PVC VACName to go from non-nil to nil
2025-07-23 12:52:30 -07:00
Surya Seetharaman
4c87e60d0d Tests using .host field in probes must be at priviledged level
The sig-node tests have scenarios of doing probes and
lifecycle handler tests with post-start and pre-stop hooks
setting the host field to be another pod.

In baseline level such things won't be allowed because of
the PSA rules we are adding in this PR. So unsetting
the host field means it uses the podIP of self for doing
the checks and using that in the pre-stop and post-start
hooks is tricky because of the timing issues with when the
container is actually up v/s running the test.

So I have changed the tests to be privileded for them to
use the .host fields if they desire to.

See https://github.com/kubernetes/kubernetes/issues/133091
which is an issue opened to properly refactor these tests.

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:17:05 +02:00
Surya Seetharaman
f94fcac868 Add new fixture testData for 1.34 PSA
This commit adds the fixture tests for the
new .host field restrictions on probe
and lifecycle handlers.

ran UPDATE_POD_SECURITY_FIXTURE_DATA=true go test -v ./test/... -run TestFixtures

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:15:46 +02:00
Surya Seetharaman
fc0474d771 Copy test fixtures to 1.34 from 1.32
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:15:46 +02:00
Surya Seetharaman
9540a96396 Copy test fixtures to 1.33 from 1.32
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:15:46 +02:00
Surya Seetharaman
4a3ebf886c update the minimal version to fix unit/fixture tests
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:15:46 +02:00
Surya Seetharaman
333b19b441 Add PSA for blocking .host field on pod probes and lifecycle
Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
2025-07-23 21:15:45 +02:00
Kubernetes Prow Robot
6d99828b80 Merge pull request #133127 from bart0sh/PR184-DRA-skip-flaky-test-on-Windows
DRA: skip flaky test case on Windows
2025-07-23 11:42:27 -07:00
Jordan Liggitt
c7bf3b81f6 Add flake debugging for admission test 2025-07-23 13:51:18 -04:00
Dawei Wei
a806e069e2 Remove WinDSR feature gate unit test 2025-07-23 17:40:53 +00:00
Kubernetes Prow Robot
1cead78757 Merge pull request #133147 from pohly/dra-allocator-experimental
DRA: Add experimental allocator variant
2025-07-23 10:30:35 -07:00
Kubernetes Prow Robot
c41cc0a144 Merge pull request #129837 from danwinship/aggregated-apiserver-endpointslices
Port aggregated apiserver discovery to EndpointSlices
2025-07-23 10:30:28 -07:00