Commit Graph

11982 Commits

Author SHA1 Message Date
Hemant Kumar
49dabe56d0 Monitor progress tracking for permission change 2025-02-24 15:55:37 -05:00
Kubernetes Prow Robot
06d81cfc7a Merge pull request #130359 from my-git9/assertion1
fix wrong assertion on tests
2025-02-24 05:18:34 -08:00
xin.li
bc4ae15d77 fix wrong assertion on tests
Signed-off-by: xin.li <xin.li@daocloud.io>
2025-02-23 16:53:50 +08:00
mansikulkarni96
b9f6013c12 fix: handle socket file detection on Windows
Cherry-picked 4060ee60c1
Update socket file detection logic to use os.Stat as per upstream
Go fix for golang/go#33357. This resolves
the issue where socket files could not be properly identified on
Windows systems.
2025-02-21 18:02:28 -05:00
Antonio Ojea
2418b54ee2 Revert "Add random interval to nodeStatusReport interval every time after an actual node status change" 2025-02-21 17:29:08 +01:00
Kubernetes Prow Robot
5822bb5232 Merge pull request #130101 from danwinship/controller-ip-canonicalization
Canonicalize IPs written out by controllers
2025-02-20 19:48:26 -08:00
Tim Allclair
97cb563cae Require auth for all new Kubelet endpoints 2025-02-19 12:17:05 -08:00
Tim Allclair
3f4ef42e9a Move PodResizeStatus cache out of allocated state 2025-02-18 09:19:23 -08:00
Kubernetes Prow Robot
c26c59a0b8 Merge pull request #130124 from marosset/windows-unit-tests-memory-manager-fixes
fixing k8s.io/kubernetes/pkg/kubelet/cm/memorymanager unit tests on Windows
2025-02-13 15:52:21 -08:00
Mark Rossetti
df1e9eeeb8 skipping InPlacePodVerticleScaling unit tests on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2025-02-12 15:57:20 -08:00
Mark Rossetti
569eb41f23 fixing k8s.io/kubernetes/pkg/kubelet/cm/memorymanager unit tests on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2025-02-12 15:27:58 -08:00
Kubernetes Prow Robot
fbdf8905ea Merge pull request #130058 from gjkim42/add-disableLegacySidecarContainers
Add LegacySidecarContainers feature gate
2025-02-12 13:16:27 -08:00
Kubernetes Prow Robot
cd2959b798 Merge pull request #127525 from scott-grimes/patch-1
fix: pods meeting qualifications for static placement when cpu-manager-policy=static should not have cfs quota enforcement
2025-02-12 12:02:21 -08:00
Gunju Kim
f2f4634bd3 Add LegacySidecarContainers feature gate
This adds LegacySidecarContainers feature gate that enables the legacy
code path that predates the SidecarContainers feature to safely remove
the code.

This temporary feature gate is disabled by default, only available in
v1.33, and will be removed in v1.34.
2025-02-12 20:15:49 +09:00
Dan Winship
e31a3989fc Make kubelet always canonicalize the PodIPs 2025-02-11 21:46:15 -05:00
Kubernetes Prow Robot
c81431de59 Merge pull request #129477 from felipeagger/feat/improve-alloc-res-ckpt
[FG:InPlacePodVerticalScaling] Improve allocated resources checkpointing
2025-02-11 12:06:10 -08:00
Scott Grimes
1c5170ff52 disable cfs quota when exclusive cpus allocated per static cpu policy requirements 2025-02-11 13:42:30 -05:00
Kubernetes Prow Robot
39f1c90ac0 Merge pull request #129735 from swatisehgal/device-mgr-logs-improvements
Device Manager logging improvements
2025-02-07 07:11:56 -08:00
Kubernetes Prow Robot
20b12ad5c3 Merge pull request #129685 from swatisehgal/cpu-mgr-logs-improvements
CPU Manager logging improvements
2025-02-07 03:50:02 -08:00
Kubernetes Prow Robot
e094e5e89c Merge pull request #129684 from swatisehgal/mm-mgr-logs-improvements
Memory Manager logging improvements
2025-02-07 03:49:55 -08:00
Swati Sehgal
ecd67e2537 node: memory-mgr: Adhere to the message style guidelines
Ensure that the log messages adhere to the message style guildelines
as captured [here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#message-style-guidelines).

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 18:53:08 +00:00
Swati Sehgal
f449697457 node: device-mgr: Adhere to the message style guidelines
Ensure that the log messages adhere to the message style guildelines
as captured [here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#message-style-guidelines).

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 18:13:10 +00:00
Swati Sehgal
40c86d8e06 node: device-mgr: Ensure consistent use of named arguments
Throughout the devicemanager codebase the named argument to represent
resource for logging pupose is `resourceName` as opposed to `resource`.
The latter can only be seen in topology_hints.go files. To ensure consistency
with the rest of the codebase and also because we want to adhere to the
recommendations in the Kubernetes documentation about named arguments:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments
we update the key from `resource` to `resourceName`.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:22:24 +00:00
Swati Sehgal
19e406a357 node: device-mgr: Update klog.Infof(..., err) to klog.ErrorS(err,...)
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:21:53 +00:00
Swati Sehgal
9cd041156f node: device-mgr: Add logs in the happy path
We have reasonable amount of logs when things go wrong.
While debugging, it can be useful to have logs to indicate that
things have gone as expected.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:21:53 +00:00
Swati Sehgal
a585bd74c4 node: device-mgr: Keep log level consistent across all gRPC calls
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:21:53 +00:00
Swati Sehgal
4b613ae96f node: device-mgr: Bump log level for expected skips
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:21:53 +00:00
Swati Sehgal
584e224b43 node: device-mgr: Add metadata to logs
Ensure that if possible, we provide sufficient metadata
inclusing pod name and UID to allow filtering by pod name or its
UID.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 17:21:49 +00:00
Swati Sehgal
a10b3c3555 node: memory-mgr: Add logs when memory allocation is skipped due to QoS
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:42:19 +00:00
Swati Sehgal
6240febf4c node:memory-mgr: Add logs on the happy path
We have reasonable amount of logs when things go wrong.
While debugging, it can be useful to have logs to indicate that
things have gone as expected especially when it comes to
important events like successful startup of memory manager
and successful allocation of resources.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:41:34 +00:00
Swati Sehgal
ee7f2616c6 node: memory-mgr: Update klog.Infof(..., err) to klog.ErrorS(err,...)
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:41:02 +00:00
Swati Sehgal
07d83acce5 node: memory-mgr: Update log levels and add logs to capture state update
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:41:02 +00:00
Swati Sehgal
34fd61a3ef node: memory-mgr: Add metadata to logs
Ensure that whereever possible, we provide sufficient metadata
inclusing pod name and UID to allow filtering by pod name or its
UID.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:40:56 +00:00
Swati Sehgal
7997c93cfd node: cpu-mgr: Adhere to the message style guidelines
Ensure that the log messages adhere to the message style guildelines
as captured [here](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#message-style-guidelines).

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:30:02 +00:00
Swati Sehgal
ca2c46a273 node: cpu-mgr: Add logs when CPU allocation is skipped
CPU Allocation is skipped in CPU Manager with static policy
in case the pod doesn't belong to Guaranteed QoS or the CPUs
requested are not integral.

We add logs to capture these skips.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:26:40 +00:00
Swati Sehgal
01a546fe53 node: cpu-mgr: Add logs on the happy path
While debugging, it can be useful to have logs to indicate that
things have gone as expected especially when it comes to
important events like successful startup of CPU manager
and successful allocation of resources.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2025-02-06 16:25:07 +00:00
Filipe Xavier
14c0bc19ac kubelet: improve allocated resources checkpointing
changed calls to set allocation from container level to pod level on status manager.
2025-02-06 09:20:39 -03:00
Siyuan Zhang
8fc3a33454 Refactor compatibility version code
Replace DefaultComponentGlobalsRegistry with new instance of componentGlobalsRegistry in test api server.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move kube effective version validation out of component base.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move DefaultComponentGlobalsRegistry out of component base.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

move ComponentGlobalsRegistry out of featuregate pkg.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

remove usage of DefaultComponentGlobalsRegistry in test files.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

change non-test DefaultKubeEffectiveVersion to use DefaultBuildEffectiveVersion.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Restore useDefaultBuildBinaryVersion in effective version.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

rename DefaultKubeEffectiveVersion to DefaultKubeEffectiveVersionForTest.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

pass options.ComponentGlobalsRegistry into config for controller manager and scheduler.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Pass apiserver effective version to DefaultResourceEncodingConfig.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

change statusz registry to take effective version from the components.

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Address review comments

Signed-off-by: Siyuan Zhang <sizhang@google.com>

update vendor

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2025-02-05 16:10:53 -08:00
Kubernetes Prow Robot
72d74869e9 Merge pull request #129114 from bart0sh/PR167-fix-DRA-registration-test
kubelet: fix DRA registration test
2025-02-05 14:38:26 -08:00
Kubernetes Prow Robot
0634e21fb5 Merge pull request #128367 from vivzbansal/sidecar-2
[FG:InPlacePodVerticalScaling] Implement resize for sidecar containers
2025-02-05 14:38:15 -08:00
Kubernetes Prow Robot
fab0d76574 Merge pull request #129731 from gjkim42/promote-sidecar-containers-to-ga
Promote SidecarContainers feature to GA
2025-02-04 16:22:58 -08:00
Kubernetes Prow Robot
f82439f536 Merge pull request #129486 from iholder101/bugfix/swap-container-cri-stats
[KEP-2400] [Bugfix]: Ensure container-level swap metrics are collected
2025-02-04 08:14:59 -08:00
Kubernetes Prow Robot
6e3546228d Merge pull request #129895 from tallclair/refactor-allocation
Delete unused code: allocated state ClearState
2025-02-02 09:40:55 -08:00
Gunju Kim
8d27bf2108 Leave TODOs in pkg/kubelet/kuberuntime for later removal
This leaves TODOs in pkg/kubelet/kuberuntime to remove these redundant
code paths later, since they are supposed to be a subset of the new code
paths.
2025-02-02 17:45:50 +09:00
Gunju Kim
0bee0bcaa7 Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
Kubernetes Prow Robot
295ed0a607 Merge pull request #129901 from bart0sh/PR165-migrate-sysctl-to-contextual-logging
kubelet: Migrate pkg/kubelet/sysctl to contextual logging
2025-01-31 01:52:57 -08:00
Kubernetes Prow Robot
0e9ca10eeb Merge pull request #129504 from felipeagger/cleanup/ckpt-pod-alloc-state-mem
Cleanup Kubelet Checkpointing: Refactor state mem
2025-01-30 13:05:33 -08:00
Filipe Xavier
f7df3ec07f move log restored state to better location. 2025-01-30 12:06:12 -04:00
Francesco Romani
e766b04ade node: cm: use maps.Clone instead of reinvent it
As pointed out in https://github.com/kubernetes/kubernetes/pull/128657#discussion_r1832973928

Signed-off-by: Francesco Romani <fromani@redhat.com>
2025-01-30 14:45:04 +01:00
Ed Bartosh
71b9114840 kubelet: Migrate pkg/kubelet/sysctl to contextual logging 2025-01-30 10:31:58 +02:00