Commit Graph

11 Commits

Author SHA1 Message Date
David Ashpole
64af1adace
Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
JunYang
cafc5d1c82 filter out terminated containers in cadvisor_stats_provider 2022-07-06 19:21:27 +08:00
Zihong Zheng
9e8d8286ca
Revert "filter out terminated containers in cadvisor_stats_provider" 2022-06-15 16:09:37 -07:00
Kubernetes Prow Robot
6dc592e347
Merge pull request #108787 from 249043822/cadvisor_stat_provider_filter_0
filter out terminated containers in cadvisor_stats_provider
2022-05-20 16:50:00 -07:00
ZhangKe10140699
f69fb544fa filter out terminated containers in cadvisor_stats_provider 2022-03-22 16:36:46 +08:00
Peter Hunt
1c3357db76 kubelet/stats: take container log stats into account when checking ephemeral stats
this commit updates checkEphemeralStorage to be able to add container log stats, if applicable.

It also updates the old check when container log stats aren't found to be more accurate.
Specifically, this check previously worked because of a fluke programming accident:

according to this block in pkg/kubelet/stats/helper.go:113
```
if result.Rootfs != nil {
    rootfsUsage := *cfs.BaseUsageBytes
    result.Rootfs.UsedBytes = &rootfsUsage
}
```

BaseUsageBytes should be the value added, not TotalUsageBytes. However, since in this case
one also needs to account for the calculated log size, which is TotalUsageBytes - BaseUsageBytes
using TotalUsageBytes value accidentally worked.

Updating the case to use the correct value AND log offset fixes this accident and makes
the behavior more in line with what happens when calculating ephemeral storage.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-02-15 16:30:25 -05:00
vikram Jadhav
0de4397490 mockery to mockgen conversion 2021-09-25 16:15:08 +00:00
ruiwen-zhao
36b4ccdb7c Add AcceleratorStats to cri_stats_provider 2020-11-30 19:30:02 +00:00
Anderson Queiroz
8c724d7933 cleanup: fix golint errors in /pkg/kubelet/stats 2020-10-08 21:59:42 +02:00