Commit Graph

12976 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
799572b8db Merge pull request #134711 from mortent/SimpleScoringForPrioritizedList
DRA: Add scoring for Prioritized List feature
2025-11-05 12:36:51 -08:00
Kubernetes Prow Robot
189b0052a5 Merge pull request #135100 from HirazawaUi/fix-3257
Fix potential dryrun failure when NodeLocalCRISocket reaches GA
2025-11-05 11:26:57 -08:00
Morten Torkildsen
fbfeb33231 DRA: Add scoring for Prioritized List feature 2025-11-05 17:18:38 +00:00
HirazawaUi
79dc7908ff Fix potential dryrun failure when NodeLocalCRISocket reaches GA 2025-11-05 23:46:03 +08:00
Kubernetes Prow Robot
5fd9cefd95 Merge pull request #134995 from yongruilin/flagz-kk-structure
[KEP-4828] Flagz versioned structured response
2025-11-04 19:02:04 -08:00
Kubernetes Prow Robot
c1a6a3ca71 Merge pull request #134152 from pohly/dra-device-taints-1.35
DRA: device taints: new ResourceSlice API, new features
2025-11-04 15:32:07 -08:00
Patrick Ohly
f4a453389d DRA device taint eviction: configurable number of workers
It might never be necessary to change the default, but it is hard to be sure.
It's better to have the option, just in case.
2025-11-04 21:57:24 +01:00
yongruilin
2422bc0bb8 feat: Implement structured /flagz endpoint 2025-11-04 19:45:30 +00:00
Kubernetes Prow Robot
a058cf788a Merge pull request #134624 from yt2985/podcertificates-beta
Promote Pod Certificates feature to beta
2025-11-04 11:42:12 -08:00
Lukasz Szaszkiewicz
257ff6edcd kubelet/app/server_bootstrap_test: fix Test_buildClientCertificateManager 2025-11-04 09:59:11 +01:00
Kubernetes Prow Robot
4e8499740e Merge pull request #134985 from swatisehgal/node-cm-ctx-logging-migration
node: cm: migrate container manager to contextual logging
2025-11-03 09:34:12 -08:00
Kubernetes Prow Robot
5e2ad84f67 Merge pull request #134906 from carlory/fix-kubeadm-3229
kubeadm: added container runtime version check to preflight
2025-11-02 23:36:04 -08:00
tinatingyu
59e075e8d3 Promote PodCertificateRequests to v1beta1 2025-11-02 05:33:44 +00:00
Kubernetes Prow Robot
f66d1a9418 Merge pull request #133779 from carlory/kubelet-cleanup-pod-infra-container-image
Remove deprecated pod-infra-container-image flag
2025-10-31 10:10:07 -07:00
Kubernetes Prow Robot
299a4fc2d2 Merge pull request #134847 from prometherion/feat/kubeadm-dns-signature
refactor(kubeadm): including dns addon version to signature
2025-10-31 03:52:05 -07:00
carlory
b3415bfdfe kubeadm: added container runtime version check to preflight
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-10-31 09:51:01 +08:00
Kubernetes Prow Robot
9efb7ee538 Merge pull request #134313 from richabanker/statusz-structured
[KEP:4827] Structured statusz
2025-10-30 13:16:10 -07:00
Siyuan Zhang
67143028e7 Add --min-compatibility flag.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-10-30 13:36:38 -05:00
Swati Sehgal
05f67d834a node: cm: migrate container manager to contextual logging
This commit migrates the container manager package to use
contextual logging.

This follows the contextual logging migration pattern where:
- Logger is passed from the boundary down to implementations
- klog.TODO() is used at call sites where context is not yet available
- Functions with context.Context extract logger via klog.FromContext(ctx)
- klog.InfoS/ErrorS/V().InfoS calls are replaced with logger.Info/Error/V().Info
- Sub-managers receive proper logger context from their callers

Some call sites still use klog.TODO() as placeholders, with TODO
comments indicating these will be replaced with proper contextual loggers
as the migration continues upward through the call stack.

Test/fake implementations use klog.Background() which is the appropriate
choice for test code where no real context is available.

Mock file updates (pkg/kubelet/cm/testing/mocks.go) were done manually
due to mockery tool incompatibility with Go 1.25 and will be committed
separately with an explanation.

Key changes:

1. PodContainerManager and ContainerManager interface updates:
   - PodContainerManager.EnsureExists: add logger parameter
   - PodContainerManager.Destroy: add logger parameter
   - PodContainerManager.ReduceCPULimits: add logger parameter
   - PodContainerManager.SetPodCgroupConfig: add logger parameter
   - ContainerManager.UpdateQOSCgroups: add logger parameter
   - Update all implementations (Linux, Windows, stub, noop, fake)

2. Helper function updates:
   - GetKubeletContainer: add logger parameter (Linux and unsupported platforms)
   - Update cmd/kubelet/app/server.go to pass logger to GetKubeletContainer
   - Comment out type assertion in helpers.go due to signature change

3. Cgroup manager contextual logging:
   - CgroupManager interface methods updated to accept logger:
     * Destroy: add logger parameter
     * ReduceCPULimits: add logger parameter
     * SetCgroupConfig: add logger parameter
   - Update cgroupCommon and unsupportedCgroupManager implementations
   - Migrate klog.InfoS/V().InfoS calls to logger.Info/V().Info

4. Container manager implementation updates:
   - Extract logger from context in NewContainerManager() and Start()
   - Pass logger to sub-managers (deviceManager, topologyManager)
   - Update DRA manager initialization to use logger from context
   - Migrate klog.InfoS/ErrorS to logger.Info/Error throughout

5. Call sites updated with TODO comments:
   - pkg/kubelet/kubelet.go: UpdateQOSCgroups, EnsureExists
   - pkg/kubelet/kubelet_pods.go: UpdateQOSCgroups, ReduceCPULimits, Destroy
   - pkg/kubelet/kuberuntime/kuberuntime_manager.go: SetPodCgroupConfig
   - pkg/kubelet/kuberuntime/kuberuntime_manager_test.go: test expectations

Most call sites currently use klog.TODO() as placeholders, with TODO
comments indicating these will be replaced with proper contextual loggers
as the migration continues upward through the call stack.

Test/fake implementations use klog.Background() which is the appropriate
choice for test code where no real context is available.

Mock file updates (pkg/kubelet/cm/testing/mocks.go) were done manually
due to mockery tool incompatibility with Go 1.25 and will be committed
separately with an explanation.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-10-30 18:34:03 +00:00
Richa Banker
c1a95eb7e2 Structured statusz 2025-10-30 10:39:52 -07:00
Kubernetes Prow Robot
3ec2d82da5 Merge pull request #134784 from michaelasp/svm_beta2
SVM: bump the API to beta, remove unused fields
2025-10-29 13:56:02 -07:00
Michael Aspinwall
3b72759d1b Update SVM to Beta
Co-authored-by: Stanislav Láznička <stlaz.devel@proton.me>
2025-10-29 19:36:11 +00:00
Kubernetes Prow Robot
110408060c Merge pull request #134542 from hoskeri/clean-loopback-clients
Drop loopback clients if unused
2025-10-28 09:10:02 -07:00
Kubernetes Prow Robot
0517fc4126 Merge pull request #134866 from neolit123/1.35-kubeadm-drop-etcd-extra-versions
kubeadm: improve the etcd version mapping
2025-10-27 12:31:42 -07:00
Kubernetes Prow Robot
59616d50fd Merge pull request #134691 from SergeyKanzhelev/watchdogIsGA
Lock SystemdWatchdog feature gate
2025-10-27 03:43:37 -07:00
Dario Tranchitella
65dcb4ce2c refactor(kubeadm): including dns addon version to signature
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-10-27 10:06:23 +01:00
Francesco Romani
fd5b2efa76 node: cpumanager: migrate to contextual logging
migrate the cpumanager code to contextual logging

design musings:
- golang contexts "[...] carries deadlines, cancellation signals, and
  other request-scoped values across API boundaries and between
  processes." (see: https://pkg.go.dev/context#pkg-overview).
  Thus, it generally makes sense to add contexts to most of the APIs
  and functions  as the resource management is done in the admission flow, when
  ultimately we process a request and we have time bounds;
- however, receiving a context from the outside and depending on it
  kind also conflicts with the goal of having uniform logging and "
  - attach key/value pairs that get included in all log messages
  - add names that describe which component or operation triggered a log messages"
  (see:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging#summary)
  Some of this conflict is due to the transitional nature of the PRs
  which we do when updating the codelet codebase. We can envision a
  final state on which the top level caller adds identifying information
  like pod UID and pod namespace/name pair; but up until all the calling
  chain is updated and wired, the results are gonna be inconsistent.
- continuing from the point above, the most realistic transition plan
  for the kubelet is outlined in
  https://github.com/kubernetes/kubernetes/issues/130069 .
  Since we do want to move in parallel and migrate on a
  subsystem-by-subsystem basis, each subsystem will be in charge to add
  the data they want to their contexts. I think this is the only
  reasonnable way forward, and the cost will be overhead and redundancy.
  We should do sweeping changes to uniform the flows once we completed
  the full transition to ensure uniformity.
- there are some well known packages which want to operate by design
  only in in-memory data structure, which arguably can't block.
  Shoehorning a context feels not great. Instead, we intentionally pass
  only the logger, which still is the core idea of contextual logging
  (see:
https://github.com/kubernetes/kubernetes/pull/125912#discussion_r1935919144)
  examples are the topology subpackage and the cpu_assignment logic
  (takeByTopology and friends)

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-10-27 08:38:58 +01:00
Abhijit Hoskeri
a35785c033 Drop loopback clients if unused
kube-controller-manager and kube-scheduler do not use the
configured loopback clients. Drop them.

Fix up scheduler test server to not depend on
the loopback client.
2025-10-26 14:47:57 -07:00
Kubernetes Prow Robot
ec5425a6ef Merge pull request #134744 from neolit123/1.35-update-system-validators-to-v1.12.0
vendor: update system-validators to v1.12.1
2025-10-24 13:07:40 -07:00
Lubomir I. Ivanov
294ff15342 kubeadm: improve the etcd version mapping
For historic reasons kubeadm kept track of a skew of 2+
etcd version in a map in the constants.go file.

This is really not required because kubeadm supports only
2 version of etcd mapped to two Kubernetes versions,
which are essentially the control plane versions.

Refactor the constants.go map to only include 2 versions.
Make sure that's reflected in a unit test.

Instead of pinning the versions as literal numbers,
start using the version we get on build time.

Adapt various unit tests and functions to allow this change
to work, since during unit tests we need actual values
and the build versions are not populated. This is achieved
by requiring the functions to accept a map[uint8]string
used for testing.
2025-10-24 20:54:22 +02:00
Kubernetes Prow Robot
60e1f61a63 Merge pull request #133511 from BenTheElder/no-md5
eliminate md5 usage, block new usage
2025-10-24 10:59:35 -07:00
Lubomir I. Ivanov
c403fd4481 kubeadm: validate the KubeletVersion for cgroups v1
By using k8s.io/system-validators v1.12.1 a KubeletVersion
can be passed to the CgroupsValidator. The library
can then decide if to throw an error or a warning.

An error is thrown if the version is >= 1.35.

During upgrade pass a KubeletVersion that is with MINOR+1
to account for the target upgrade version. That is just
an assumption that the user will upgrade the kubelet too,
but it is better to throw an error for this
common use case instead of just a warning that is seen
after the upgrade command has finished.
2025-10-24 11:14:58 +02:00
Kubernetes Prow Robot
57c243f33c Merge pull request #134450 from mayank-agrwl/controller-contextual-logs
Replace HandleCrash and HandleError calls to use context-aware alternatives
2025-10-23 00:49:02 -07:00
Kubernetes Prow Robot
0bb040288a Merge pull request #134781 from neolit123/1.35-removete-WaitForAllControlPlaneComponents-fg
kubeadm: remove the GA WaitForAllControlPlaneComponents FG
2025-10-22 18:46:39 -07:00
Kubernetes Prow Robot
eea58e01f4 Merge pull request #134743 from marquiz/devel/configz-cgroupdriver-fix
kubelet: fix kubeletconfig.cgroupDriver in configz
2025-10-22 17:38:38 -07:00
Kubernetes Prow Robot
972517f0dd Merge pull request #134281 from siyuanfoundation/fix-test
adopt consistent way to set feature gate based on emulation version for kcm and scheduler test server.
2025-10-22 13:26:39 -07:00
Siyuan Zhang
70ac573619 adopt consistent way to set feature gate based on emulation version for kcm and scheduler test server.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-10-22 13:20:30 -05:00
Kubernetes Prow Robot
4695bb6c19 Merge pull request #134779 from joshjms/bump-etcd-v3.5.24
etcd: Bump supported etcd version to v3.5.24 for release v1.32, v1.33, and v1.34
2025-10-22 10:32:48 -07:00
Kubernetes Prow Robot
501b768370 Merge pull request #134545 from novahe/fix-missing-apiversion
Fix missing involvedObject.apiVersion in event
2025-10-22 09:00:40 -07:00
Lubomir I. Ivanov
c49bdda383 kubeadm: remove the GA WaitForAllControlPlaneComponents FG
The kubeadm specific FG WaitForAllControlPlaneComponents
went GA and was locked enabled by default in 1.34.

In 1.35 it can be removed.
2025-10-22 17:14:02 +02:00
joshjms
3fbd1a1787 etcd: bump etcd to v3.5.24 for k8s v1.32, v1.33, v1.34
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-22 22:38:57 +08:00
novahe
9d48e7d2d4 fix missing involvedObject.apiVersion in event 2025-10-22 20:13:36 +08:00
Lubomir I. Ivanov
38373335cd kubeadm: adjust the etcd version map for release 1.35
Remove 1.31, add 1.35.
Also, add a note that there are a couple of variables
that must be updated as well.
2025-10-22 12:28:19 +02:00
Benjamin Elder
e0df6b178a migrate kubeadm static pod hashing to fnv-1a
128bit fnv-1a should be drop-in for md5 while being fast and non-obsolete
for non-cryptographic purposes.
2025-10-21 15:25:11 -07:00
Markus Lehtonen
49e4fe9d2b kubelet: fix kubeletconfig.cgroupDriver in configz
Reflect the correct cgroupDriver setting in the configz enpoint in case
the cgroup driver setting is received from the CRI. Moves the
initialization of the configz handler to a slightly later phase where
the CRI has been queried.
2025-10-21 11:23:22 +03:00
Kubernetes Prow Robot
b5c4ebc898 Merge pull request #134539 from adrianmoisey/kep-5495-add-deprecation-warning-to-kube-proxy
KEP: 5495 - Add deprecation warning for ipvs
2025-10-20 06:34:43 -07:00
Lubomir I. Ivanov
0613fdeccb kubeadm: add missing cluster-info context validation
When retrieving the cluster-info CM, ensure the cluster pointed
out by the current context in the kubeconfig is validated.

Add unit test for the above.

Make the function GetClusterFromKubeConfig() to return various
errors. Handle the errors on call sites. Add unit tests
for the update.

The above changes prevent panics when the users has manually
edited and malformed the kubeconfig in the cluster-info CM.
2025-10-20 11:58:58 +02:00
Adrian Moisey
44a268e272 KEP: 5495 - Add deprecation warning for ipvs 2025-10-18 15:11:58 +02:00
joshjms
51fc3c744a bump etcd to v3.5.23 for release v1.31, v1.32, and v1.33
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-18 02:10:21 +08:00
Sergey Kanzhelev
9864c29861 Lock SystemdWatchdog feature gate 2025-10-17 17:50:41 +00:00