Commit Graph

891 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f057f2de1c
Merge pull request #124956 from TommyStarK/remove-deprecated-otel-noop-tracer
cmd/kubelet: remove deprecated otel NewNoopTracerProvider
2024-06-06 17:05:34 -07:00
Stephen Kitt
5300466a5c
Use canonical json-patch v4 import
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-05-28 10:48:22 +02:00
TommyStarK
902a6b55eb
cmd/kubelet: remove deprecated otel NewNoopTracerProvider
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2024-05-19 23:43:06 +02:00
bells17
1c917aa463
component-helpers: Support structured and contextual logging (#120637) 2024-04-24 03:06:15 -07:00
Kubernetes Prow Robot
ef2c682635
Merge pull request #122082 from carlory/remove-keep-terminated-pod-volumes
keep-terminated-pod-volumes flag on kubelet is removed
2024-04-17 23:59:54 -07:00
Kubernetes Prow Robot
3fda574e5e
Merge pull request #121770 from frzifus/tracing_kubelet_read-only
pass tracerprovider to kublet-readonly server
2024-04-17 23:59:33 -07:00
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
carlory
b47c73ee26 keep-terminated-pod-volumes flag on kubelet is removed 2024-03-01 18:42:15 +08: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
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
Benedikt Bongartz
099eba784b
pass tracerprovider to kublet-readonly server
Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
2023-11-07 06:15:45 +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
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
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
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
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
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
Kubernetes Prow Robot
779abe6ebe
Merge pull request #115399 from 3u13r/feat/documentTLS13Exception
Add note about TLS 1.3 cipher suites
2023-04-11 15:35:27 -07:00
Dan Winship
068ee321bc Add CloudDualStackNodeIPs feature gate(s)
Add CloudDualStackNodeIPs feature gates for kubelet and
cloud-controller-manager and use as appropriate.
2023-03-15 17:15:51 -04:00
Dan Winship
77e0fbe774 Update ParseNodeIPArgument for cloud dual-stack
Add an arg to ParseNodeIPArgument saying whether to allow dual-stack
IPs for external cloud providers. Update kubelet for the new API, but
always pass "false" for now.
2023-03-15 14:50:17 -04:00
Dan Winship
0f1f1711fe Move kubelet --node-ip parsing to component-helpers
The same code should be used to parse the command-line argument and
the annotation. Unfortunately, for compatiblity reasons, they have to
handle invalid inputs differently...

(It doesn't make sense to put this code in cloud-provider, since
ParseNodeIPArgument is used for the non-cloud-provider case too.)
2023-03-15 14:50:17 -04:00
Kubernetes Prow Robot
1586138519
Merge pull request #115750 from saschagrunert/otel-beta
Graduate `KubeletTracing` feature to beta
2023-03-14 16:34:33 -07:00
Kubernetes Prow Robot
352665e290
Merge pull request #116131 from SataQiu/fix-kubelet-20230228
kubelet: avoid duplicate printing the flag deprecation warnings during re-parsing
2023-03-09 22:43:41 -08:00
Kubernetes Prow Robot
e57d968323
Merge pull request #116015 from SataQiu/clean-kubelet-20230223
kubelet: remove the deprecated --master-service-namespace flag
2023-03-09 22:43:34 -08:00
Swati Sehgal
6a62f0236a node: topologymgr: trivial internal variable renaming
Since Topology manager is graduating to GA, we remove
internal configuration variable names with `Experimental`
prefix.

There is no expected change in behavior, only trival
variable renaming.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:11 +00:00
Swati Sehgal
d536a342b4 node: topologymgr: GA graduation implies Feature Gate is ON by default
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:05 +00:00
Sergey Kanzhelev
04189b1fc4 rename ExperimentalPodPidsLimit to PodPidsLimit 2023-03-04 01:48:16 +00:00
SataQiu
91089ce65b kubelet: remove the deprecated --master-service-namespace flag 2023-03-01 18:44:59 +08:00
SataQiu
75ef759810 kubelet: avoid duplicate printing the flag deprecation warnings during re-parsing 2023-02-28 22:58:40 +08:00
Sascha Grunert
37caed0e19
Graduate SeccompDefault feature to stable / GA
Updating the required code and docs for SeccompDefault to go GA, which
now means that we enable the feature per default.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-15 15:28:07 +01:00
Sascha Grunert
a28385ebe2
Graduate KubeletTracing feature to beta
We now graduate `KubeletTracing` to beta, which means we enable the
feature gate per default.

Part of https://github.com/kubernetes/enhancements/issues/2831

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-14 10:05:35 +01:00