Skip to content

Add a diagram shows how metrics-server handles kubectl top pod request #1654

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CatherineF-dev
Copy link
Contributor

@CatherineF-dev CatherineF-dev commented May 7, 2025

See diagram at https://github.com/kubernetes-sigs/metrics-server/blob/d8993efbc4c82ba49335c4a513575cdc0f8a8fea/README.md

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CatherineF-dev
Once this PR has been reviewed and has the lgtm label, please assign serathius for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 7, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If metrics-server contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 7, 2025
@CatherineF-dev CatherineF-dev changed the title Add a diagram shows how metrics-server handles a list pod request Add a diagram shows how metrics-server handles kubectl top pod request May 7, 2025
@slashpai
Copy link
Member

slashpai commented May 8, 2025

This is very nice :)

@slashpai
Copy link
Member

slashpai commented May 8, 2025

https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_metrics-server/1654/pull-metrics-server-verify/1920253007463714816 is been stuck something to do after golang ci update probably I will take a look but for now closing and reopening the PR will help

@slashpai
Copy link
Member

slashpai commented May 8, 2025

/close

@k8s-ci-robot
Copy link
Contributor

@slashpai: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@slashpai
Copy link
Member

slashpai commented May 8, 2025

/reopen

@k8s-ci-robot k8s-ci-robot reopened this May 8, 2025
@k8s-ci-robot
Copy link
Contributor

@slashpai: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@CatherineF-dev
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 8, 2025
@serathius
Copy link
Contributor

/retest

participant PL as cache.GenericLister (Pods)

Client->>APIServer: GET /apis/metrics.k8s.io/v1beta1/namespaces/{ns}/pods[/{podName}]
APIServer->>MS: List(ctx, opts) or Get(ctx, name, opts)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we simplify this diagram to just show List and skip mention of Get. At the top you mention kubectl top pods which will do List as pod name is not specified.

sequenceDiagram
participant Client
participant APIServer
participant MS as api.podMetrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to be able to recognize participants that are part of Metrics Server and which are not. I also don't know if mentioning internal implementation details like structures storage.Storage brings any value or would just confuse people that don't know them.

Could maybe just simplify the diagram to have metrics server as one participant and maybe create a separate diagram for internal component architecture?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could squeeze in how metrics are collected from Kubelets

@k8s-ci-robot
Copy link
Contributor

@CatherineF-dev: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-metrics-server-verify d8993ef link true /test pull-metrics-server-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@rexagod
Copy link
Member

rexagod commented May 19, 2025

/assign @serathius

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants