Skip to content
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

add cluster flags for karmadactl top pod #4223

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju zhzhuang-zju commented Nov 13, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:
add cluster flags for karmadactl top pod

Which issue(s) this PR fixes:
Parts of #4217

Special notes for your reviewer:
Extracted some public methods for subsequent implementation of the top node command

Add cluster flags to query the resource status of the cluster pod. Like
➜ karmada git:(top) ✗ karmadactl top po -Cmember1
NAME CLUSTER CPU(cores) MEMORY(bytes)
mycurlpods member1 0m 1Mi

Does this PR introduce a user-facing change?:

`karmadactl`: Introduced `--cluster` flag to `top` command to specify the cluster name.

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 13, 2023
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 13, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c3c3766) 52.83% compared to head (bdb1451) 52.82%.
Report is 16 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4223      +/-   ##
==========================================
- Coverage   52.83%   52.82%   -0.01%     
==========================================
  Files         239      240       +1     
  Lines       23558    23595      +37     
==========================================
+ Hits        12447    12465      +18     
- Misses      10434    10454      +20     
+ Partials      677      676       -1     
Flag Coverage Δ
unittests 52.82% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/karmadactl/top/top.go Outdated Show resolved Hide resolved
pkg/karmadactl/top/top_pods.go Show resolved Hide resolved
@zhzhuang-zju zhzhuang-zju force-pushed the ctl-top-pod branch 3 times, most recently from 7c88017 to bdb1451 Compare November 14, 2023 01:52
Copy link
Member

@jwcesign jwcesign left a comment

Choose a reason for hiding this comment

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

/lgtm

Can you help add the corresponding e2e?

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2023
@zhzhuang-zju
Copy link
Contributor Author

/lgtm

Can you help add the corresponding e2e?

Thx~, I added the e2e task when decomposing tasks in the issue #4217

Signed-off-by: zhzhuang-zju <m17799853869@163.com>
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2023
Copy link
Member

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

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

Nice work~

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2023
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve

@chaunceyjiang I'm surprised you are not on the approver list.
Now we lack approvers on CLI things, would you like to take the role?

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2023
@karmada-bot karmada-bot merged commit d73e47b into karmada-io:master Nov 15, 2023
12 checks passed
@chaunceyjiang
Copy link
Member

Now we lack approvers on CLI things, would you like to take the role?

Yes. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants