-
Notifications
You must be signed in to change notification settings - Fork 40k
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
e2e: adapt kubelet_perf.go to use the new summary metrics API #24003
Conversation
Labelling this PR as size/L |
GCE e2e build/test passed for commit 8e7802e4aa2f6138f9b7a2d4a522f9e908234c7b. |
|
||
var data []byte | ||
if subResourceProxyAvailable { | ||
data, err = c.Post(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) prefer get, same below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. I copied from the old code which has to use post for stats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we address this comment? We are ready to go.
cc/ @roberthbailey |
@yujuhong - can you shortly write what are advantages of this API instead of 'old' that resource-gatherer uses? We need the latter to track master components resources to look for regressions. @roberthbailey @jlowdermilk |
This PR needs to wait until #24015 lands so I can add the RSS usage. |
You can still get all the pods (including the master components) from the stats/summary endpoint. The main reason for this PR is that we don't want to deal with the raw cgroup names, and the summary api provides fixed names for the daemons (e.g., runtime, kubelet). In general, we are migrating the code to use the new summary api (see #12483 for details). |
GCE e2e build/test passed for commit ead9a71f9b1d459432f967d7fd6261504b52fd29. |
@yujuhong - Is this a cleanup, or you're going to provide some more data? |
This is a cleanup and fixes the broken tests on systemd nodes too. We might introduce more data later, not with one. |
OK, I'm assuming that it's OK to leave resource gatherer as-is for now. Note that it currently is only for tracking usage but it'll become critical before v1.3, when we'll add meta-test for resource usage regression. |
@gmarek, it's OK for now, but I'd still suggest adopting the summary api if possible. One caveat is that you don't get multiple records, so it might be more problematic to get the cpu usage through one request. |
@dchen1107 @andyzheng0831, I verified that the test passes as long as "--runtime-cgroups" is not set. Will rebase after #24015 lands. |
Awesome! Thank you for fixing it |
I don't think I'll have time for this before v1.3:/ |
This commit switch most functions in kubelet_stats.go to use the new API. However, the functions that perform one-time resource usage retrieval remain unchanged to be compatible with reource_usage_gatherer.go. They should be handled separately. Also, the new summary API does not provide the RSS memory yet, so all memory checking tests will *always* pass. We plan to add this metrics in the API and restore the functionality of the test.
Rebased and added back RSS. |
LGTM |
GCE e2e build/test passed for commit 39b1054f960e09a640c29604dd1434a5f3209349. |
GCE e2e build/test passed for commit a8c6859. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit a8c6859. |
Automatic merge from submit-queue |
@yujuhong - cherry pick approved; can you create a cherry pick pull request? |
…ck-of-#24015-kubernetes#24003-kubernetes#24205-upstream-release-1.2 Automated cherry pick of kubernetes#24015 kubernetes#24003 kubernetes#24205
…ck-of-#24015-kubernetes#24003-kubernetes#24205-upstream-release-1.2 Automated cherry pick of kubernetes#24015 kubernetes#24003 kubernetes#24205
UPSTREAM: 83419: Insecure backend proxy Origin-commit: a90a57708e0e28d225ff3f8df72a0567a3cadb23
UPSTREAM: 83419: Insecure backend proxy
This commit switch most functions in kubelet_stats.go to use the new API.
However, the functions that perform one-time resource usage retrieval remain
unchanged to be compatible with reource_usage_gatherer.go. They should be
handled separately.
Also, the new summary API does not provide the RSS memory yet, so all memory
checking tests will always pass. We plan to add this metrics in the API and
restore the functionality of the test.