Commit Graph

19 Commits

Author SHA1 Message Date
Tim Allclair
da9c2c553b Set pod watch conditions for resize 2024-11-06 11:05:24 -08:00
Tim Allclair
f4d36dd402 Add WatchCondition concept to the PLEG 2024-11-06 11:05:23 -08:00
Oksana Baranova
2474369227 kubelet: migrate pleg to contextual logging
Signed-off-by: Oksana Baranova <oksana.baranova@intel.com>
2024-09-13 12:13:26 +03:00
Kubernetes Prow Robot
386a6af12b Merge pull request #124297 from hshiina/evented-timestamp
EventedPLEG: Pass event created timestamp correctly to cache
2024-09-10 18:41:00 +01:00
Hironori Shiina
0289216183 Revert "Update global cache timestamp more frequently"
This reverts commit dbc47341fa.
2024-09-10 10:15:41 +02:00
Hironori Shiina
05605d7ca4 Revert "Address feedback"
This reverts commit 7aa7062892.
2024-09-10 10:15:22 +02:00
Hironori Shiina
7aa7062892 Address feedback 2024-08-26 11:01:25 +02:00
Sascha Grunert
ae8f6f002d cri: allow GetContainerEvents to pass a context
The context can be used for timeout purposes for example, not really for
Kubernetes but other consumers like cri-tools.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-02 12:03:34 +02:00
Hironori Shiina
dbc47341fa Update global cache timestamp more frequently
There are some cases where a pod worker is woken up without a cache
update by the PLEG such as a pod termination. Then, the worker gets
stuck in `cache.GetNewerThan()` till the global cache timestamp is
updated by the PLEG. In order to unblock the stuck worker as early as
the Generic PLEG, this fix makes the Evented PLEG update the global
cache as frequently as the Generic PLEG.
2024-05-08 10:51:33 +02:00
Hironori Shiina
76128586a2 Pass event created timestamp correctly to cache
`CreatedAt` timestamp of `ContainerEventResponse` should be passed as
nanoseconds to `time.Unix()`.
2024-04-12 20:14:23 +02:00
Sascha Grunert
51199deaa0 Decouple kubelet/cri/remote package from kubelet/metrics
Importing the `k8s.io/kubernetes/pkg/kubelet/metrics` package in the
remote runtime implementation makes it harder to separate the
functionalities at some later point in time. We now decouple both
packages by extending the CRI API services to allow a callback on
`GetContainerEvents`. This callback can be used to do additional work if
the connection got established, because `GetContainerEvents` will go
into blocking mode after that.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-03-07 11:46:06 +01: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
Quan Tian
d9b941b782 Remove undesired verbose fields from log
The if and else branches have the exactly same code, which looks
confusing and doesn't make sense. According to the comment, the else
branch should log the error and podUID only.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-05-18 16:07:45 +08:00
Harshal Patil
05f04f866e Keep PLEG interruptions in a separate interface
Signed-off-by: Harshal Patil <harpatil@redhat.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2023-04-26 12:14:26 -04:00
mantuliu
17db22d055 Fix potential mutex usage bug
Signed-off-by: mantuliu <240951888@qq.com>
2023-04-21 23:50:33 +08:00
Harshal Patil
412b4b3329 Add connection related metrics to EventedPLEG
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2023-03-01 11:35:27 -05:00
Chen Wang
7db339dba2 This commit contains the following:
1. Scheduler bug-fix + scheduler-focussed E2E tests
2. Add cgroup v2 support for in-place pod resize
3. Enable full E2E pod resize test for containerd>=1.6.9 and EventedPLEG related changes.

Co-Authored-By: Vinay Kulkarni <vskibum@gmail.com>
2023-02-24 18:21:21 +00:00
ruiwen-zhao
fabcc91956 Ignore container events with nil PodSandboxStatus
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2023-01-31 22:50:51 +00:00
Harshal Patil
86284d42f8 Add support for Evented PLEG
Signed-off-by: Harshal Patil <harpatil@redhat.com>
Co-authored-by: Swarup Ghosh <swghosh@redhat.com>
2022-11-08 20:06:16 +05:30