mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-15 14:26:57 +00:00
Automatic merge from submit-queue (batch tested with PRs 54843, 55810). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Integrating cadvisor stats to CRI Pod stats collection For kubernetes-incubator/cri-containerd#341 **What this PR does / why we need it**: This PR contains changes to update kubelet to consume metrics from both CRI and cadvisor for Pod stats. The corresponding cadvisor changes are here https://github.com/google/cadvisor/pull/1795. Today CRI stats provides only core metrics such as CPU Usage, Memory Usage, Disk Usage. However the stats exposed by kubelet which is a superset of core metrics and Network, User Defined Metrics are not provided by CRI stats. Hence kubelet stats are extracted from 2 sources , CRI stats and cadvisor stats. After the change the summary stats for a CRI based runtime (containerd) is as show here: https://gist.github.com/abhi/d7351861df6430eb4bc5d711d274ec35 This PR also contains test case change to reflect the stats for cri stats provider. **Which issue(s) this PR fixes** : Fixes # https://github.com/kubernetes-incubator/cri-containerd/issues/341 **Special notes for your reviewer**: https://docs.google.com/presentation/d/1Os3nyMRBlFuiBLCjPgeaPv6jXylrZW5jiDXJejlA3Wg/edit#slide=id.g27cb4cb6d8_0_0 Godep will be updated to main tree after https://github.com/google/cadvisor/pull/1795 PR is merged. **Release note**: ```release-note Kubelet can provide full summary api support except container log stats for CRI container runtime now. ``` cc @Random-Liu