Commit Graph

1619 Commits

Author SHA1 Message Date
Patrick Ohly
d59676a545 dra kubelet: publish NodeResourceSlices
The information is received from the DRA driver plugin through a new gRPC
streaming interface. This is backwards compatible with old DRA driver kubelet
plugins, their gRPC server will return "not implemented" and that can be
handled by kubelet. Therefore no API break is needed.

However, DRA drivers need to be updated because the Go API changed. They can
return
    status.New(codes.Unimplemented, "no node resource support").Err()
if they don't support the new ListAndWatchResources method and
structured parameters.

The controller in kubelet then synchronizes this information from the driver
with NodeResourceSlice objects, creating, updating and deleting them as needed.
2024-03-07 22:22:13 +01:00
Kevin Hannon
e90782bec8 fail LimitedSwap with cgroupv1 2024-03-05 20:19:27 -05:00
Kubernetes Prow Robot
3686ceb5b8
Merge pull request #122745 from kannon92/swap-no-swap-default
[KEP-2400] add no swap as the default option for swap
2024-03-05 16:32:40 -08:00
Kubernetes Prow Robot
5fd38a8c78
Merge pull request #122907 from sohankunkerkar/prepare-kep-3983-for-beta
[KEP-4419]: promote KubeletConfigDropInDir feature to beta
2024-03-05 14:45:39 -08:00
Kevin Hannon
6a4e19a4ec add no swap as the default option for swap 2024-03-05 16:10:42 -05:00
Sohan Kunkerkar
b40b5f86d8 *: promote KubeletConfigDropInDir feature to beta
This change removes the environment variable set during
the Alpha phase and prepares the feature for beta graduation.

xref: https://github.com/kubernetes/enhancements/pull/4419

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
2024-03-01 15:00:50 -05:00
Maksym Pavlenko
d9e2487d0c Add PodLogsPath to kubelet config
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-16 09:55:59 -08:00
Dan Winship
4ddf69a835 Remove checks of the CloudDualStackNodeIPs feature gate 2024-02-05 11:35:11 -05:00
Tim Allclair
8bf03e83d3 Stop claiming --node-labels is alpha 2024-01-31 14:04:44 -08:00
Kubernetes Prow Robot
7abf6770fd
Merge pull request #122147 from pohly/kubelet-context-support
kubelet: enhance context support
2024-01-27 05:16:17 -08:00
Kubernetes Prow Robot
7bb00356f0
Merge pull request #122857 from nilo19/chore/cleanup-azure
chore: Cleanup in-tree credential provider azure and cloud provider a…
2024-01-23 21:31:11 +01:00
Qi Ni
3bf2bf8191 chore: Cleanup in-tree credential provider azure and cloud provider azure 2024-01-20 15:18:31 +08:00
xigang
99979fd98a kubelet: cleanup system-reserved and kube-reserved flag usage
Signed-off-by: xigang <wangxigang2014@gmail.com>
2024-01-04 20:34:23 +08:00
carlory
55e1646fa4 removed the deprecated azureFile in-tree storage plugin 2024-01-04 14:41:33 +08:00
Patrick Ohly
d11511b1e8 kubelet: enhance context support
27a68aee3a introduced context support for events. Creating an event
broadcaster with context makes tests more resilient against leaking goroutines
when that context gets canceled at the end of a test and enables per-test
output via ktesting.

To use this in kubelet, a more thorough code update is needed. For now,
context.TODO serves as a reminder that this is necessary.
2023-12-01 10:15:01 +01:00
Sohan Kunkerkar
ee5578be52 cmd/kubelet: fix overriding default KubeletConfig fields in drop-in configs if not set
This commit resolves an issue where certain KubeletConfig fields, specifically:
- FileCheckFrequency
- VolumeStatsAggPeriod
- EvictionPressureTransitionPeriod
- Authorization.Mode
- EvictionHard
were inadvertently overridden when not explicitly set in drop-in configs. To retain the
original values if they were absent in the drop-in configs, mergeKubeletConfigurations
uses a JSON patch merge strategy to selectively merge configurations. It prevents essential
configuration settings from being overridden, ensuring a more predictable behavior for users.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
Co-authored-by: Peter Hunt <pehunt@redhat.com>
2023-11-03 17:48:29 -04:00
Kubernetes Prow Robot
0501933e56
Merge pull request #121291 from bzsuni/ga/CSIMigrationvSphere
Remove GA featuregate about CSIMigrationvSphere in 1.29
2023-10-26 01:08:06 +02:00
Jordan Liggitt
441d2b40df
Undeprecated kubelet cloud-provider flag 2023-10-19 11:32:34 -04:00
bzsuni
7561284819 Remove GA featuregate about CSIMigrationvSphere in 1.29
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2023-10-17 20:44:50 +08:00
Kubernetes Prow Robot
413de8cc71
Merge pull request #120740 from champtar/reserved-cpus-log-fixup
kubelet: fix log when using --reserved-cpus
2023-10-16 19:07:26 +02:00
Gunju Kim
a0610a97b3
pkg/kubelet/cm: Remove deprecated sets.String and sets.Int
This removes deprecated sets.String and sets.Int
- replace sets.String with sets.Set[string]
- replace sets.Int with sets.Set[int]
- replace sets.NewString with sets.New[string]
- replace sets.NewInt with sets.New[int]
- replace sets.(OLD).List with sets.List(NEW)
2023-09-27 22:02:15 +09:00
Etienne Champetier
272b23cc7a kubelet: fix log when using --reserved-cpus
Fixes ae381fcf09
2023-09-18 16:52:19 -04:00
Kubernetes Prow Robot
4fd8bd9975
Merge pull request #118568 from qiutongs/node-startup-latency
Create a node startup latency tracker
2023-09-15 13:00:12 -07:00
Qiutong Song
d3eb082568 Create a node startup latency tracker
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2023-09-11 05:54:25 +00:00
Sohan Kunkerkar
d5690f12b6 pkg/kubelet: allow sandbox image pinning from CRI
As part of this change, the code responsible for managing the sandbox
image within the kubelet has been removed. Previously, the kubelet used
to prevent sandbox image from the garbage collection process. However,
with this update, the responsibility of managing the sandbox containers
has been shifted to the CRI implementation itself. By allowing sandbox
image pinning from CRI, we improve efficiency and simplify the kubelet's
interaction with the container runtime. As a result, the kubelet can now
rely on the container runtime's built-in mechanisms for sandbox container
lifecycle management.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
2023-08-29 15:34:51 -04:00
Sohan Kunkerkar
06a81d1395 cmd/kubelet: implement drop-in configuration directory for kubelet
This implements a drop-in configuration directory for the kubelet
by introducing a "--config-dir" flag. Users can provide individual
kubelet config snippets in separate files, formatted similarly to
kubelet.conf. The kubelet will process the files in alphanumeric order,
appending configurations if subfield(s) doesn't exist, overwriting them if
they do, and handling lists by overwriting instead of merging.

Co-authored-by: Yu Qi Zhang <jerzhang@redhat.com>
2023-07-18 21:41:14 -04:00
Kubernetes Prow Robot
ff90c1cc73
Merge pull request #119374 from danwinship/kep-3178-ga
move KEP-3178 IPTablesOwnershipCleanup to GA
2023-07-17 15:53:47 -07:00
Dan Winship
f1e7386fbc Deprecate now-unused kubelet iptables flags 2023-07-17 16:51:47 -04:00
Peter Hunt
bfa62e0009 kubelet: retry RuntimeConfig call and prep for nil values from GetLinux
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-07-17 13:05:30 -04:00
Markus Lehtonen
d7797fbc61 kubelet: get cgroup driver config from CRI
This patch modifies kubelet to get the cgroup driver setting from the
CRI runtime using the newly added RuntimeConfig rpc. The new code path
only takes place if the KubeletCgroupDriverFromCRI feature gate is
enabled. If the runtime returns a not-implemented error kubelet falls
back to using the cgroupDriver configuration option, with a log message
instructing the user to upgrade to w newer container runtime. Other rpc
errors cause kubelet to exit as is the case if the runtime returns an
unknown cgroup driver.
2023-07-17 12:27:05 -04:00
Markus Lehtonen
fd434003f3 kubelet: initialization of runtime service earlier in the startup
This patch refactors the kubelet startup code to initialize the runtime
service earlier in the startup sequence. We want this to be able to
query the cgroup driver setting from the CRI befure initializing the
cgroup manager.
2023-07-17 12:27:05 -04:00
Kubernetes Prow Robot
cab65e2008
Merge pull request #118816 from PiotrProkop/topo-opts-to-beta
topologymanager: Promote support for improved multi-numa alignment in Topology Manager to beta
2023-07-14 16:55:08 -07:00
Kubernetes Prow Robot
20e60a03df
Merge pull request #110863 from claudiubelu/path-filepath-update-2
Replaces path.Operation with filepath.Operation (part 2)
2023-07-13 09:56:37 -07:00
PiotrProkop
f855a23b45 topologymanager: promote TopologyManagerPolicyOptions feature to beta
* Promote TopologyManagerPolicyOptions feature to beta
* Promote PreferClosestNUMANodes TopologyManagerPolicyOption to beta

Signed-off-by: PiotrProkop <pprokop@nvidia.com>
2023-07-11 15:06:57 +02:00
Jad Haj Yahya
de07643095 Document address family of listening INET sockets 2023-07-10 15:01:13 +03:00
Kubernetes Prow Robot
52457842d1
Merge pull request #117055 from cyclinder/csi_migration
remove CSI-migration gate
2023-06-28 04:28:31 -07:00
Kubernetes Prow Robot
2353dac98a
Merge pull request #117964 from ytinirt/patch-1
Update --image-gc-low-threshold option's description
2023-06-12 13:46:26 -07:00
Kubernetes Prow Robot
03486cec21
Merge pull request #116530 from pacoxu/undepreated-provider-id
undeprecate kubelet --provider-id flag
2023-06-12 13:45:58 -07:00
SataQiu
910630fbea kubelet: mark '--azure-container-registry-config' flag as deprecated 2023-06-10 00:52:24 +08:00
cyclinder
8e4228a8c1 remove CSI-migration gate 2023-06-04 18:40:17 +08:00
Andy Zhang
1ce285ad3d
Revert "removed the deprecated azureFile in-tree storage plugin" 2023-06-02 10:20:53 +08:00
Kubernetes Prow Robot
a6f641b656
Merge pull request #118236 from andyzhangx/remove-azurefile
removed the deprecated `azureFile` in-tree storage plugin
2023-05-29 09:25:54 -07:00
Kubernetes Prow Robot
cfeb83d56b
Merge pull request #116525 from ffromani/kubelet-podresources-endpoint-ga
node: podresources: graduate to GA
2023-05-25 16:38:50 -07:00
andyzhangx
485d1631cd Remove Azure file in-tree storage plugin 2023-05-24 14:10:34 +00:00
Kubernetes Prow Robot
8f9c185696
Merge pull request #116761 from iancoolidge/devel-cpuset-revendor
Complete cpuset export to k/utils by revendoring
2023-05-12 08:37:02 -07:00
ZHAO Yao
4b50c4bb01
Update --image-gc-low-threshold option's description
kubelet option '--image-gc-low-threshold' description says it 'should not be larger than that of --image-gc-high-threshold'. But actually, it must less than '--image-gc-high-threshold', according to 02659772cb/pkg/kubelet/apis/config/validation/validation.go (L84)
2023-05-12 14:51:45 +08:00
Kubernetes Prow Robot
64af2d93e5
Merge pull request #117295 from aojea/transport_cache_metrics
add new metric for the internal client-go cache size
2023-05-11 08:59:02 -07:00
SataQiu
164113bc1c fix a bug where the KubeletConfiguration is not printed correctly in the log 2023-05-10 22:29:37 +08:00
Ian K. Coolidge
cede96336a Depend on k8s.io/utils cpuset
Steps performed:

$ find . -name '*.go' -exec sed -i
's|k8s.io/kubernetes/pkg/kubelet/cm/cpuset|k8s.io/utils/cpuset|g' {} \
$ ./hack/update-vendor.sh
$ ./hack/update-gofmt.sh
$ git rm -r pkg/kubelet/cm/cpuset/
2023-05-03 16:26:09 +00:00
Francesco Romani
69bc685556 node: podresources: graduate to GA
Lock the feature gate to ON and simplify the code
accordingly.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-05-01 16:23:28 +02:00