Commit Graph

10936 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a7b8357a55 Merge pull request #118165 from champly/master
kubelet: fix comment typo
2023-10-17 23:28:25 +02:00
Kubernetes Prow Robot
0095ae3b25 Merge pull request #120195 from Ithrael/fix/error-handling-condition-in-test
fix(test): fix error handling condition in test
2023-10-17 20:08:01 +02:00
Kubernetes Prow Robot
3d77b95bcf Merge pull request #118704 from dgl/crio-socket-fix
Match on cri-o socket suffix only
2023-10-17 20:07:52 +02:00
Kubernetes Prow Robot
7824ac0f3e Merge pull request #114336 from claudiubelu/fixes-test-get-file-type
unittests: Fixes hostutil.GetFileType for Windows
2023-10-17 20:07:39 +02:00
Kubernetes Prow Robot
639f63c4e5 Merge pull request #121261 from kannon92/revert-119882-podres-client-wait
Revert "podresources: e2e: force eager connection"
2023-10-17 16:14:29 +02:00
Kubernetes Prow Robot
873eb57a4e Merge pull request #119522 from YTGhost/validation-for-static-pods-name
add validation for static pods to have a name
2023-10-17 03:38:15 +02:00
Kubernetes Prow Robot
c5815fee72 Merge pull request #113825 from harche/ep_comments
Keep PLEG interruptions in a separate interface
2023-10-17 03:37:57 +02:00
Kubernetes Prow Robot
f6ba25fdbd Merge pull request #119026 from AxeZhan/sleepAction
Introducing Sleep Action for PreStop Hook
2023-10-16 21:19:44 +02:00
Kubernetes Prow Robot
c7d270302c Merge pull request #121059 from matte21/improve_err_message_in_cpu_assignments
Improve error message in Kubelet CPU assignment logic
2023-10-16 16:48:54 +02:00
Kubernetes Prow Robot
0de29e1d43 Merge pull request #120911 from gjkim42/devicemanager-remove-deprecated-sets-string
pkg/kubelet/cm: Remove deprecated sets.String and sets.Int
2023-10-16 16:48:40 +02:00
Kevin Hannon
dd9c3358f5 Revert "podresources: e2e: force eager connection" 2023-10-16 09:46:04 -04:00
AxeZhan
3a96afdfef implementation 2023-10-15 13:57:48 +08:00
Kubernetes Prow Robot
378866edba Merge pull request #120518 from saschagrunert/metrics-container-start
kubelet: fix metric `container_start_time_seconds` timestamp
2023-10-15 07:05:37 +02:00
Kubernetes Prow Robot
95bd8b95a7 Merge pull request #100448 from saschagrunert/cri-stats-log
Do not error log CRI stats for not cached partitions
2023-10-14 23:49:12 +02:00
Kubernetes Prow Robot
4911aad463 Merge pull request #115702 from xyz-li/master
Fix:  kubelet will not output logs after log file is rotated
2023-10-14 22:42:04 +02:00
Kubernetes Prow Robot
a7f8c2f787 Merge pull request #118846 from cyclinder/net.ipv4.tcp_keepalive_time
Mark net.ipv4.tcp_keepalive_time as a safe sysctl
2023-10-13 05:02:51 +02:00
Kubernetes Prow Robot
8923c3c871 Merge pull request #119659 from kannon92/beta-pod-ready-to-start
[KEP-3085] Promote PodReadyToStartContainers to beta in 1.29
2023-10-12 22:49:16 +02:00
Kevin Hannon
c94240e2e2 move kubelet constant for podreadytostart to staging 2023-10-12 11:18:11 -04:00
Kubernetes Prow Robot
38a1ec75f0 Merge pull request #119882 from ffromani/podres-client-wait
podresources: e2e: force eager connection
2023-10-12 15:59:55 +02:00
cyclinder
0167a9f833 mark net.ipv4.tcp_keepalive_time as a safe sysctl 2023-10-11 10:24:19 +08:00
matte21
d4a5a085a8 Improve error message in cpu assignment logic
Include number of requested and available CPUs in the error message
when the assignment of CPUs fails because there are less available
CPUs than requested.
2023-10-09 13:31:37 -04:00
Antonio Ojea
3ee2f27e5b kubelet: cloud-provider external addresses
Kubelet, if using cloud provider external, initializes temporary
the node addresses using the non-cloud provider logic, until the
cloud provider overrides it.

This behavior has undesired consequences if the cloud-provider addresses
are different than the original ones, specially for hostNetwork pods,
that inherit these addresses from the Node.

Since some cloud-providers depend on this behavior, in order to keep
backward compatibility, assume that the specifying addresses via
the node-ip flags means that the intent is to keep the existing
behavior to temporary initialize the addresses.

If the node-ips are the unspecified addresses or are not set, then
wait for the external cloud provider to set the node addresses.

Change-Id: I3a3895f9b830769f9658e6a03f058c914c438a09
Signed-off-by: Antonio Ojea <aojea@google.com>
2023-10-06 14:01:28 +00:00
matte21
a213edae2a Add package-level godoc to pkg/kubelet/cm
Add file doc.go with some rudimentary information to package
kubelet/cm. This will make it easier for people approaching the
kubelet codebase for the first time to quickly understand what's
in the package, since its name is abbreviated and hostile to
newcomers.
2023-10-05 14:20:51 -04:00
Kubernetes Prow Robot
a321897e77 Merge pull request #120262 from harche/list_timeout
Add timeout to listContainerStats context
2023-10-02 07:46:46 -07:00
Kubernetes Prow Robot
622509830c Merge pull request #120716 from xrstf/fix-typos
Fix typos
2023-09-30 00:25:56 -07: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
Evan Lezar
394bcaf182 Only configure swap if available on node
This change bypasses all logic to set swap in the linux container
resources if a swap controller is not available on node. Failing
to do so may cause errors in runc when starting a container with
a swap configuration -- even if this is set to 0.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2023-09-26 21:32:58 +02:00
Evan Lezar
d3d1827c05 Use local isCgroup2UnifiedMode consistently
This change switches to using isCgroup2UnifiedMode locally to ensure
that any mocked function is also used when checking the swap controller
availability.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2023-09-21 16:09:04 +02:00
Kubernetes Prow Robot
f9f00da6bc Merge pull request #118761 from TommyStarK/gh_113831
move common logic of highestSupportedVersion to util package
2023-09-18 13:59:25 -07:00
TommyStarK
42356bfbb3 move common logic of highestSupportedVersion to util package
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-09-18 21:25:29 +02:00
Kubernetes Prow Robot
82bca6304b Merge pull request #119464 from TommyStarK/dra/cleanup-manager-unit-tests
dra: cleanup manager unit tests
2023-09-18 07:08:43 -07:00
Christoph Mewes
79a7833ade fix typo Mininum => Minimum 2023-09-17 11:24:29 +02: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
Kubernetes Prow Robot
d393d4e151 Merge pull request #120574 from logicalhan/cslis
promote component SLIs to GA; remove feature gates for component slis
2023-09-14 22:52:12 -07:00
Kubernetes Prow Robot
a08ee80807 Merge pull request #119829 from cvvz/fix-volumemanager-logs
fix: implement MarshalLog for structures in volumemanager for structured-logging.
2023-09-13 07:46:12 -07:00
Kubernetes Prow Robot
74f6c263d8 Merge pull request #118544 from sohankunkerkar/remove-sandbox-image-ref
pkg/kubelet: allow sandbox image pinning from CRI
2023-09-11 11:52:12 -07:00
Han Kang
e6435e98ed promote component SLIs to GA; remove feature gates for component slis 2023-09-11 09:15:32 -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
Kubernetes Prow Robot
49768134e5 Merge pull request #119754 from pbxqdown/kubelet-fix-typo
Fix some typos in kubelet component source code
2023-09-09 19:36:11 -07:00
Sascha Grunert
5e0931336b kubelet: fix metric container_start_time_seconds's timestamp
Adapting the tests and reverting https://github.com/kubernetes/kubernetes/pull/103429

Carry-over from https://github.com/kubernetes/kubernetes/pull/117881

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-09-08 09:13:37 +02:00
Kubernetes Prow Robot
58ce734223 Merge pull request #120255 from likakuli/feat-addreferenceonlyfirsttime
feat: minimize unnecessary API requests to the API server for the configmap/secret get API
2023-09-07 06:42:57 -07:00
Kubernetes Prow Robot
b27670dfbd Merge pull request #118740 from saschagrunert/kubelet-label-types
Make kubelet label types public
2023-09-06 23:46:57 -07:00
Francesco Romani
2ea47038b9 podresources: e2e: force eager connection
Add and use more facilities to the *internal* podresources client.
Checking e2e test runs, we have quite some
```
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused": rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused"
```

This is likely caused by kubelet restarts, which we do plenty in e2e tests,
combined with the fact gRPC does lazy connection AND we don't really
check the errors in client code - we just bubble them up.

While it's arguably bad we don't check properly error codes, it's also
true that in the main case, e2e tests, the functions should just never
fail besides few well known cases, we're connecting over a
super-reliable unix domain socket after all.

So, we centralize the fix adding a function (alongside with minor
cleanups) which wants to trigger and ensure the connection happens,
localizing the changes just here. The main advantage is this approach
is opt-in, composable, and doesn't leak gRPC details into the client
code.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-09-07 08:24:49 +02:00
David Leadbeater
2c5a11a55b Match on cri-o socket suffix only
This deals with the case that a user can configure cri-o to use
/run/crio/crio.sock and get very confusing behavior.

See https://github.com/cri-o/cri-o/issues/7010#issuecomment-1594149469
2023-09-04 15:08:20 +10:00
Gunju Kim
696f84aeb0 Feature-gate SidecarContainers code in pkg/kubelet/kuberuntime 2023-09-01 00:13:47 +09:00
likakuli
e167ecbb9e fix: only invoke AddReference first time when to sync same pod to minimize unnecessary API requests to the API server for the configmap/secret get API
Signed-off-by: likakuli <1154584512@qq.com>
2023-08-31 22:56:49 +08:00
Harshal Patil
2e174a029f Add timeout to listContainerStats context
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2023-08-30 10:49:44 -04:00
ithrael
e187368242 fix(test): fix TestGetPodResourcesV1 comparison logic in tests 2023-08-30 10:39:58 +08: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
cvvz
03126c5465 add comment 2023-08-29 10:46:31 +08:00