New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stats for podAndContainerStatsFromCRI #113291
Fix stats for podAndContainerStatsFromCRI #113291
Conversation
Skipping CI for Draft Pull Request. |
/sig instrumentation |
🤦 thanks @mengjiao-liu ! |
261e317
to
c518315
Compare
c518315
to
7df446a
Compare
Since PR #110897 is pending by #110897 (comment), The tests required for this PR have been added, no more waiting for PR #110897 to be merged. |
/lgtm |
7df446a
to
2940484
Compare
/assign @dashpole |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dashpole, mengjiao-liu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
What type of PR is this?
/kind bug
What this PR does / why we need it:
According to the feature gate
PodAndContainerStatsFromCRI
design, we should only obtain stats data from CRI when the feature gatePodAndContainerStatsFromCRI
is enabled. When getting data from CRI fails, we will use cAsvisor stats to populate summary stats information. However, when the current code can obtain stats from CRI, it does not return in time. stats mixed with cAdvisor is still returned.The commit that introduced this issue: 6b3f8e5
in PR: #103095
The current unit in the file
pkg/kubelet/stats/cri_stats_provider_test.go
is for the case where there is no testPodAndContainerStatsFromCRI
for true.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: