karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.09k stars 795 forks source link

feat: introducing a karmadactl top command #3593

Closed chaunceyjiang closed 8 months ago

chaunceyjiang commented 10 months ago

What type of PR is this? /kind feature

What this PR does / why we need it:

image

The difference between kubectl and karmadactl lies in the fact that karmadactl has introduced a new column called "Cluster", which allows you to view the resource usage of pods in different clusters.

Please see more details.

https://github.com/karmada-io/karmada/pull/3578#issuecomment-1562449707

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmadactl`: Introduced `top` command.
chaunceyjiang commented 10 months ago

image

codecov-commenter commented 10 months ago

Codecov Report

Merging #3593 (62482f4) into master (25db1e0) will decrease coverage by 0.02%. Report is 2 commits behind head on master. The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3593      +/-   ##
==========================================
- Coverage   54.71%   54.69%   -0.02%     
==========================================
  Files         229      229              
  Lines       22074    22074              
==========================================
- Hits        12077    12074       -3     
- Misses       9351     9354       +3     
  Partials      646      646              
Flag Coverage Δ
unittests 54.69% <ø> (-0.02%) :arrow_down:

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

see 1 file with indirect coverage changes

chaunceyjiang commented 9 months ago

image

chaunceyjiang commented 9 months ago

/cc @carlory @lonelyCZ Please take a look.

jwcesign commented 8 months ago

Can we push it forward?

chaunceyjiang commented 8 months ago

/cc @jwcesign PTAL.

chaunceyjiang commented 8 months ago

/cc @RainbowMango @carlory @lonelyCZ

chaunceyjiang commented 8 months ago

image

image

image

image

Is the output sorted by default?

Default Sorting

  1. Sort by cluster name
  2. Sort by resource namespace
  3. Sort by resource name
chaunceyjiang commented 8 months ago

image

chaunceyjiang commented 8 months ago

/cc @RainbowMango Updated.

karmada-bot commented 8 months ago

[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: - ~~[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)~~ [RainbowMango] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment