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
0b7629d2cc
kubelet/stats: add unit test for when container logs are found
...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-02-15 16:34:54 -05: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
Peter Hunt
ab0f274a6f
kubelet/stats: update cadvisor stats provider with new log location
...
in https://github.com/kubernetes/kubernetes/pull/74441 ,
the namespace and name were added to the pod log location.
However, cAdvisor stats provider wasn't correspondingly updated.
since CRI-O uses cAdvisor stats provider by default, despite being a CRI implementation,
eviction with ephemeral storage and container logs doesn't work as expected, until now!
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-02-15 16:04:16 -05:00
Ciprian Hacman
0819451ea6
Clean up logic for deprecated flag --container-runtime in kubelet
...
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00
Kubernetes Prow Robot
518a3c2f70
Merge pull request #107108 from linxiulei/fix_pid
...
Read number of running processes from /proc/loadavg.
2022-02-10 01:15:47 -08:00
Eric Lin
fea15977c8
Consider threads-max when deciding MaxPID.
...
Fixes kubernetes#107111
2022-01-17 21:51:59 +00:00
Eric Lin
5fdf24baca
Read number of running processes from /proc/loadavg.
...
Fallback to using sysinfo syscall if failed.
Fix kubernetes#107107
2022-01-11 21:33:53 +00:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Sascha Grunert
de37b9d293
Make CRI v1
the default and allow a fallback to v1alpha2
...
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-17 11:05:05 -08:00
Antonio Ojea
d126b14838
migrate nolint coments to golangci-lint
2021-11-17 13:58:53 +01:00
James Sturtevant
ab2e58c416
Get networks stats directly
2021-11-10 12:43:56 -08:00
James Sturtevant
c39945c116
Add unit tests to existing code
2021-11-10 11:50:04 -08:00
Peter Hunt
6b3f8e5662
kubelet: fallback to partial CRI stats if full fails
...
This is partially to allow the kube alpha tests to pass until CRI implementations have support, but also to handle this error situation a bit more elegantly
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Peter Hunt
feb5f5e0ed
kubelet: use helper function to check for nil fields in sandbox stats
...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Peter Hunt
85e8a4bf73
kubelet stats: use UsageNanoCores if available
...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Peter Hunt
ffdb4b9c4a
kubelet: slightly move around some cri stats functions
...
to reduce duplication and add clarity
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Peter Hunt
d2c436700e
kubelet stats: add support for podAndContainerStatsFromCRI
...
This commit adds an initial implementation of translating from the new CRI fields
to the /stats/summary PodStats object
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Peter Hunt
7866287ba1
kubelet stats: wire up podAndContainerStatsFromCRI feature gate
...
though it is currently unused
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-10-29 09:40:20 -04:00
Kubernetes Prow Robot
cab54856f1
Merge pull request #104933 from vikramcse/automate_mockery
...
conversion of tests from mockery to mockgen
2021-09-30 18:33:21 -07:00
vikram Jadhav
0de4397490
mockery to mockgen conversion
2021-09-25 16:15:08 +00:00
Kubernetes Prow Robot
44d4d007bf
Merge pull request #103424 from 249043822/br-cadvisor-perf
...
Optimize kubelet stats provider for perfomace bottleneck
2021-09-21 11:56:18 -07:00
Kubernetes Prow Robot
2f6b9166d7
Merge pull request #104039 from YanzhaoLi/extract-containerdid-from-various-cgrouppath
...
Get containerID from systemd-style cgroupPath in cri_stats_provider
2021-08-25 17:05:22 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
...
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
YanzhaoLi
545d898584
Extract containerID from systemd-style cgroupPath in cri_stats_provider
...
And fix test to generate UUID without dash
2021-08-11 19:03:56 -07:00
KeZhang
1467065352
Optimize kubelet stats provider for perfomace bottleneck
2021-07-14 11:11:12 +08:00
Kubernetes Prow Robot
3e588be763
Merge pull request #101712 from SergeyKanzhelev/disableAcceleratorUsageMetricsOnContainerd
...
disable collecting of accelerator metrics in cAdvisor
2021-05-17 13:39:51 -07:00
Joel Smith
1e0ca5bdc7
Fix log spam for du failure on pod etc-hosts metrics
2021-05-03 08:29:56 -06:00
Sergey Kanzhelev
e8ae653c1d
disable collecting of accelerator metrics and exposing it for containerd
2021-04-30 22:16:34 +00:00
Niekvdplas
fec272a7b2
Fixed several spelling mistakes
2021-03-30 23:02:09 +02:00
James Sturtevant
c9eff4e906
Get filesystem stats for files on Windows
2021-03-08 12:50:23 -08:00
Kubernetes Prow Robot
930ca85613
Merge pull request #99607 from krzysiekg/structured_logging_pkg_kubelet_stats
...
Migrate pkg/kubelet/stats to structured logging
2021-03-04 00:28:38 -08:00
Krzysztof Gibuła
7097d4f8e2
Migrate pkg/kubelet/stats to structured logging
2021-03-01 18:52:34 +01:00
Benjamin Elder
56e092e382
hack/update-bazel.sh
2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
ac101cbdda
Merge pull request #97042 from joelsmith/eviction
...
Measure/compute used ephemeral storage in stats provider, not eviction manager
2020-12-14 08:47:30 -08:00
Joel Smith
29ff2fe528
Remove now-unused eviction helpers, fix unit test TestCRIListPodStats
2020-12-03 13:04:25 -07:00
Derek Carr
acb43c7c4a
Rework hostfs metrics
...
Ephemeral storage usage should be calculated by the metrics code,
not the eviction code.
2020-12-03 13:04:25 -07:00
ruiwen-zhao
36b4ccdb7c
Add AcceleratorStats to cri_stats_provider
2020-11-30 19:30:02 +00:00
Qiutong Song
a59a6b984f
fix CPU time of pod stats with cs.CPU.Time
...
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2020-11-03 09:29:18 +00:00
Anderson Queiroz
8c724d7933
cleanup: fix golint errors in /pkg/kubelet/stats
2020-10-08 21:59:42 +02:00
Marek Siarkowicz
7d309e0104
Move Kubelet Summary API to staging repo
2020-09-22 18:23:28 +02:00
David Ashpole
0ffc149ccc
move dashpole to emeritus in kubelet
2020-09-16 11:52:35 -07:00
Jordan Liggitt
f33dc28094
generated: hack/update-hack-tools.sh && hack/update-vendor.sh
2020-07-25 16:45:02 -04:00
Kubernetes Prow Robot
86ab25f038
Merge pull request #91716 from kadisi/append_mutations_kubelet
...
fix unexpected append mutations about pkg/kubelet package
2020-06-19 21:51:08 -07:00
Kubernetes Prow Robot
677e8d6871
Merge pull request #86223 from dashpole/owners_changes
...
Add dashpole as kubelet approver
2020-06-18 22:59:58 -07:00
kadisi
a75323c76b
fix unexpected append mutations about pkg/kubelet package
...
Signed-off-by: kadisi <iamkadisi@163.com>
Co-authored-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2020-06-03 13:36:57 +08:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Davanum Srinivas
9006b2db69
Fix for API change in cadvisor
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:53:03 -04:00