Kevin Hannon
26923b91e8
implementation of split disk kep
2023-11-01 14:46:33 -04:00
Kevin Hannon
8ae0d390d7
add container filesystem to CRI api
...
Co-authored-by: Mike Brown <brownwm@us.ibm.com>
2023-10-23 15:04:30 -04:00
Sascha Grunert
39dcad8a19
Populate CRI filesystem info error
...
Usually we just log the error but since it's used by the GC we now
populate it up the call stack.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-10-16 13:09:04 +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
b27670dfbd
Merge pull request #118740 from saschagrunert/kubelet-label-types
...
Make kubelet label types public
2023-09-06 23:46:57 -07:00
Kubernetes Prow Robot
6b0e66abad
Merge pull request #116968 from mansikulkarni96/windowsStatsFromCRI
...
kubelet: Implement support for Windows podAndContainerStatsFromCRI
2023-07-18 11:07:10 -07:00
Itamar Holder
59e3e3897e
Add SwapStats to summary API through CRI
...
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-18 02:55:56 +03:00
Itamar Holder
87ff9c4525
Add swap statistics to CRI-API
...
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-18 02:55:53 +03:00
Sascha Grunert
a6554b9d5d
Make kubelet label types public
...
We use the label definitions in CRI-O, means we now make them public to
stop vendoring/copying this part of Kubernetes.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-10 10:58:44 +02:00
mansikulkarni96
14952cef5b
kubelet: Move Linux stats to a Linux specific file
...
This commit moves the Linux stats from CRI to a linux specific
file and adds unimplemented methods for platform other than
Linux and Windows.
2023-05-01 01:02:36 -04:00
Sascha Grunert
337f4e524a
Do not error log CRI stats for not cached partitions
...
We do not have any cached partitions available on Kubelet start with an
empty container storage in CRI-O. This means that the error log message
is not actually an error and more an information.
This means we now pre-filter those cases and do not `klog.ErrorS` any
more. This helps to avoid log spamming in huge clusters.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-03-02 10:10:00 +01:00
Claudiu Belu
b9bf3e5c49
Replaces path.Operation with filepath.Operation (kubelet)
...
The path module has a few different functions:
Clean, Split, Join, Ext, Dir, Base, IsAbs. These functions do not
take into account the OS-specific path separator, meaning that they
won't behave as intended on Windows.
For example, Dir is supposed to return all but the last element of the
path. For the path "C:\some\dir\somewhere", it is supposed to return
"C:\some\dir\", however, it returns ".".
Instead of these functions, the ones in filepath should be used instead.
2022-11-08 16:05:48 +00:00
Mengjiao Liu
2940484a9a
Fix stats for podAndContainerStatsFromCRI
2022-11-07 10:41:45 +08:00
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
Peter Hunt
6d9264247d
kubelet/stats: deduplicate makePodStorageStats
...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2022-08-16 16:54:29 -04:00
Paco Xu
e073b0fd65
Disable AcceleratorUsage Metrics: ga
2022-07-30 12:31:43 +08: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
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
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
Sergey Kanzhelev
e8ae653c1d
disable collecting of accelerator metrics and exposing it for containerd
2021-04-30 22:16:34 +00:00
Krzysztof Gibuła
7097d4f8e2
Migrate pkg/kubelet/stats to structured logging
2021-03-01 18:52:34 +01: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
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
Marek Siarkowicz
7d309e0104
Move Kubelet Summary API to staging repo
2020-09-22 18:23:28 +02: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
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
tangcong
2b984b3e3a
fix kubelet stats staticcheck error
2020-04-21 07:16:58 +08:00
louisgong
e56d40d048
remove unused param
2020-03-24 09:25:04 +08:00
louisgong
0efb70c0a2
eviction by process number
2020-03-24 09:25:04 +08:00
Kubernetes Prow Robot
ac97b2d65e
Merge pull request #83507 from lyft/support-resetting-cpuacct
...
Prevent returning invalid usageNanoCores value when cpuacct is reset in a live container
2020-02-09 08:45:53 -08:00
Kubernetes Prow Robot
a931227952
Merge pull request #83504 from lyft/remove-all-terminated-containers
...
cri_stats_provider: do not consider exited containers when calculating cpu usage
2019-12-16 17:53:39 -08:00
yuxiaobo
81e9f21f83
Correct spelling mistakes
...
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +08:00
Ashley Kasim
7d4f555449
correctly handle resetting cpuacct in a live container
2019-11-04 13:06:43 -08:00
Ashley Kasim
3be31530d5
cri_stats_provider: do not consider exited containers when calculating cpu usage
2019-10-04 09:07:53 -07:00
Paul Fisher
f798cee51e
pkg/kubelet: fix uint64 overflow when elapsed UsageCoreNanoSeconds exceeds 18446744073
2019-09-03 15:54:26 -07:00
Tim Allclair
6510d26b6a
Fix misc static check issues
2019-08-21 10:40:21 -07:00