Commit Graph

131288 Commits

Author SHA1 Message Date
Patrick Ohly
241ac018e2 DRA integration: remove unnecessary anonymous import
It's unclear why k8s.io/kubernetes/pkg/apis/resource/install needs
to be imported explicitly. Having the apiserver and scheduler ready
to be started ensures that all APIs are available.
2025-07-17 21:18:28 +02:00
Patrick Ohly
bc338e7505 DRA scheduler: implement filter timeout and cancellation
The intent is to catch abnormal runtimes with the generously large default
timeout of 10 seconds.

We have to set up a context with the configured timeout (optional!), then
ensure that both CEL evaluation and the allocation logic itself properly
returns the context error. The scheduler plugin then can convert that into
"unschedulable".

The allocator and thus Filter now also check for context cancellation by the
scheduler. This happens when enough nodes have been found.
2025-07-17 21:18:28 +02:00
Patrick Ohly
025c606e39 DRA scheduler: add plugin configuration
The only option is the filter timeout.
The implementation of it follows in a separate commit.
2025-07-17 16:47:47 +02:00
Patrick Ohly
ee38a00131 DRA scheduler: add DRASchedulerFilterTimeout feature gate
Initializing the scheduler Features struct will be needed in different places,
therefore NewSchedulerFeaturesFromGates gets introduced. Besides, having it
next to the struct makes it easier to add new features.

The DRASchedulerFilterTimeout feature gate simplifies disabling the timeout
because setting a feature gate is often easier than modifying the scheduler
configuration with a zero timeout value.

The timeout and feature gate are new. The gate starts as beta and enabled by
default, which is consistent with the "smaller changes with low enough risk
that still may need to be disabled..." guideline.
2025-07-17 16:47:47 +02:00
Patrick Ohly
837ef29f5a scheduler: enhance and document Filter cancellation
When using context.CancelCause in the scheduler and context.Cause in plugins,
the status returned by plugins is more informative than just "context
canceled".

Context cancellation itself is not new, but many plugin authors probably
weren't aware of it because it wasn't documented.
2025-07-17 16:47:47 +02:00
Patrick Ohly
7910b43cd3 scheduler_perf: document benchstat usage
With benchstat it's easy to do before/after comparisons, but the section for
running benchmark didn't mention it at all and didn't work as shown there:
- benchmark results must be printed (FULL_LOG)
- timeout might have been too short (KUBE_TIMEOUT)
- only "short" benchmarks ran (SHORT)
- klog log output must be redirected (ARTIFACTS)
2025-07-17 16:47:46 +02:00
Kubernetes Prow Robot
84cacae704 Merge pull request #133023 from carlory/fix-132838
kubeadm should generate default etcd command based on etcd version
2025-07-17 06:34:31 -07:00
Kubernetes Prow Robot
d33af7f7ef Merge pull request #133020 from pohly/apimachinery-list-map-keys
support optional listMapKeys in server-side apply
2025-07-17 06:34:24 -07:00
Kubernetes Prow Robot
b2d7149090 Merge pull request #133011 from ylink-lfs/chore/residual_int64ptr_removal
chore: remove residual int64ptr usage with ptr.To
2025-07-17 02:58:24 -07:00
carlory
cef9f9edb6 kubeadm: fix a bug where it should generate default etcd command based on etcd version when the etcd image tag supports semver 2025-07-17 16:58:58 +08:00
Kubernetes Prow Robot
71b8ad965e Merge pull request #132976 from yliaog/allocator
refactor allocator, removed claimsToAllocate from NewAllocator(), instead, passed it through Allocate()
2025-07-17 01:48:31 -07:00
Kubernetes Prow Robot
051cf278cf Merge pull request #131293 from skitt/typo-watchAction
Typo fix: watchActcion
2025-07-17 01:48:24 -07:00
Patrick Ohly
a1a85ddb16 SSA: test optional map keys
As of structured-merge-diff v6.3.0, list map keys may be optional, as long as
at least one key is provided.
2025-07-17 09:56:28 +02:00
Jordan Liggitt
4d34975a46 sigs.k8s.io/structured-merge-diff/v6 v6.3.0 2025-07-17 09:56:28 +02:00
Patrick Ohly
3357e8fc05 SSA: add integration tests
test/integration/apiserver/apply covers the behavior of server-side-apply (SSA)
for official APIs. But there seem to be no integration tests which cover the
semantic of SSA like adding/removing/updating entries in a list map. This adds
such a test.

It needs an API which is under control of the test and uses
k8s.io/apimachinery/pkg/apis/testapigroup for that purpose, with some issues
fixed (OpenAPI code generation complained) and a new list map added.

Registering that API group in the apiserver needs a REST storage and
strategy. The API group only gets added in the test. However, the production
code has to know about it. In particular,
pkg/generated/openapi/zz_generated.openapi.go has to describe it.
2025-07-17 09:56:28 +02:00
Kubernetes Prow Robot
729cf12002 Merge pull request #132973 from tallclair/mem-lim-decrease-stats
Add PodCPUAndMemoryStats to stats.Provider interface
2025-07-16 20:02:37 -07:00
Kubernetes Prow Robot
8f312e6fbf Merge pull request #132348 from iholder101/swap/add-container-swap-limit-metric
[KEP-2400] Add a container_swap_limit_bytes metric
2025-07-16 20:02:30 -07:00
Kubernetes Prow Robot
9f545c5b46 Merge pull request #130992 from dshebib/addRegularContainerImageChangeToE2E_reverted
E2E Node Tests: Remove failing test from reverted PR
2025-07-16 20:02:23 -07:00
Kubernetes Prow Robot
7ff59e8507 Merge pull request #132936 from cici37/mapMetrics
Remove redundant metric field
2025-07-16 18:56:45 -07:00
Kubernetes Prow Robot
a08b85c9f6 Merge pull request #132847 from ylink-lfs/test/pod_update_ut
test: increase test coverage for pkg/kubelet/types
2025-07-16 18:56:37 -07:00
Kubernetes Prow Robot
6f29199af5 Merge pull request #131926 from esotsal/update_history_of_checkpointing_support
[doc] Update history of checkpoint support in Kubelet
2025-07-16 18:56:30 -07:00
Kubernetes Prow Robot
803ec16f56 Merge pull request #130430 from simonfogliato/kubelet-test-duplicate-line
Removed kubelet test duplicate line.
2025-07-16 18:56:23 -07:00
ylink-lfs
ad220eb6c3 chore: remove residual int64ptr usage with ptr.To 2025-07-17 09:08:12 +08:00
Tim Allclair
a964468638 Add PodCPUAndMemoryStats to stats.Provider interface 2025-07-16 15:59:55 -07:00
Kubernetes Prow Robot
c462949a7c Merge pull request #132969 from liggitt/conversion-gen-equality
fix conversion-gen memory equality test
2025-07-16 15:28:30 -07:00
Kubernetes Prow Robot
81986595c8 Merge pull request #132893 from serathius/resource-size
Add apiserver_resource_size_estimate_bytes metric
2025-07-16 15:28:23 -07:00
Kubernetes Prow Robot
de97faf7ac Merge pull request #132598 from bart0sh/PR182-DRA-handle-serving-failures
DRA plugin: handle gRPC serving failures
2025-07-16 14:18:24 -07:00
Kubernetes Prow Robot
f130a825c2 Merge pull request #132994 from utam0k/kep-5278-feature-gate
Add NominatedNodeNameForExpectation feature flag
2025-07-16 12:12:45 -07:00
Kubernetes Prow Robot
2fdba619ab Merge pull request #132979 from ylink-lfs/chore/residual_intptr_removal
chore: residual intptr removal with ptr.To
2025-07-16 12:12:38 -07:00
Kubernetes Prow Robot
47f1bb2b22 Merge pull request #132950 from serathius/apf_recursive
Use object size estimation for non-recursive list
2025-07-16 12:12:31 -07:00
Kubernetes Prow Robot
5df27c4922 Merge pull request #132833 from saschagrunert/kms-gogo
Convert `k8s.io/kms/apis` from gogo to protoc
2025-07-16 12:12:24 -07:00
Jordan Liggitt
9bcaa8c86b Fix conversion-gen caching incorrect memory equality comparisons 2025-07-16 15:11:21 -04:00
Kubernetes Prow Robot
b61534d1c8 Merge pull request #132817 from p0lyn0mial/upstream-watchlist-table-none-server-bk
watchlist supports sending resources in Table format
2025-07-16 11:04:30 -07:00
Kubernetes Prow Robot
190b3cca2b Merge pull request #132212 from astraw99/fix-sts-validation
Add validation of `volumeClaimTemplates` in StatefulSet
2025-07-16 11:04:23 -07:00
yliao
dd3691b169 refactor allocator, removed claimsToAllocate from NewAllocator(), instead, passed it through Allocate() 2025-07-16 15:11:11 +00:00
Sascha Grunert
8e6651520e Convert k8s.io/kms/apis from gogo to protoc
Use standard protoc for the kms APIs instead of gogo.

Part of kubernetes#96564

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-07-16 16:46:39 +02:00
Kubernetes Release Robot
2f605f49fc CHANGELOG: Update directory for v1.34.0-beta.0 release 2025-07-16 14:40:35 +00:00
Kubernetes Prow Robot
0c44a2b00b Merge pull request #132901 from serathius/watchcache-snapshots-beta
Graduate ListFromCacheSnapshot to Beta
2025-07-16 07:28:24 -07:00
Ed Bartosh
e4320fe25c e2e_node: DRA: test handling fatal serving failures
Added an e2e_node test to verify that the DRA plugin and
registration services cancel provided context when handling
fatal gRPC serving errors.
2025-07-16 15:49:41 +03:00
Ed Bartosh
ea05ad8887 e2e_node: DRA: add errorOnCloseListener
Introduce a mock net.Listener for tests that triggers a controlled
error on Close, enabling reliable simulation of gRPC server failures
in test scenarios.
2025-07-16 15:49:41 +03:00
Ed Bartosh
fc21d3f37d e2e: DRA: enable test plugin to cancel main context on error
Add a cancelMainContext field to ExamplePlugin and options. This
function allows the plugin to cancel an upper-level context when a
background error occurs. The HandleError method now calls this
function if it is set.

This enables DRA drivers to perform a graceful shutdown when a fatal
background error triggers context cancellation.
2025-07-16 15:49:41 +03:00
Ed Bartosh
1981c985b1 e2e: DRA: support test and public options
Refactor StartPlugin and related test helpers to accept a variadic
list of options of any type, allowing both public and test-specific
options to be passed.
2025-07-16 15:49:41 +03:00
Patrick Ohly
d44b737447 DRA: handle grpc.Server.Serve failures
Added an errHandler callback to startGRPCServer for handling errors.
Replaced direct logging of server failures with calls to the
provided error handler. This change ensures that errors are surfaced
and handled consistently.

Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2025-07-16 15:49:32 +03:00
Ed Bartosh
169965350c e2e_node: Refactor DRA tests to use variadic options
Refactor the DRA e2e_node test helpers and test cases to accept
variadic kubeletplugin.Option arguments.

This change improves test flexibility and maintainability, allowing
new options to be passed in the future without requiring widespread
code changes.

There are no functional changes to test coverage or behavior.
2025-07-16 15:42:12 +03:00
utam0k
52fab5969c Add NominatedNodeNameForExpectation feature flag
Signed-off-by: utam0k <k0ma@utam0k.jp>
2025-07-16 21:33:33 +09:00
Kubernetes Prow Robot
c4beea784c Merge pull request #130593 from mortent/DRAAllocatorImprovements
DRA: Improve allocator with better backtracking
2025-07-16 04:58:23 -07:00
Marek Siarkowicz
fd23fa3d42 Graduate ListFromCacheSnapshot to Beta 2025-07-16 12:52:01 +02:00
Kubernetes Prow Robot
b1b15a57e6 Merge pull request #132838 from AwesomePatrol/drop-experimental-etcd-flags
Drop experimental flags from etcd
v1.34.0-beta.0
2025-07-16 02:18:23 -07:00
Kubernetes Prow Robot
d5b2a0438d Merge pull request #132401 from togettoyou/refactor-admission-plugin-flags
Refactor: isolate flag registration to kube-apiserver to eliminate global state
2025-07-15 22:44:29 -07:00
Kubernetes Prow Robot
7871085906 Merge pull request #132295 from pohly/dra-version-skew
DRA: automated upgrade/downgrade testing
2025-07-15 22:44:23 -07:00