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

feat: add 'argocd-util cluster shards' command that prints shards statistics #6353

Merged
merged 1 commit into from
May 27, 2021

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented May 27, 2021

Signed-off-by: Alexander Matyushentsev [email protected]

PR implements argocd-util cluster shards that prints information about controller shards and number of resources per shard. Sample output:

argocd-util cluster shards
SHARD  RESOURCES COUNT
0      174912 (103%)
1      130555 (77%)
2      212047 (124%)
3      182060 (107%)
4      179262 (105%)
5      167561 (98%)
6      178011 (104%)
7      140308 (82%)

The command helps to understand if work is evenly shared across shards. The next step is to add --balance flag that calculates good shard for each cluster and ensure good balance for each shard.
e.g.

argocd-util cluster shards --balance

@alexmt alexmt requested a review from kshamajain99 May 27, 2021 22:10
@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #6353 (ad98a1a) into master (3604a58) will decrease coverage by 0.12%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6353      +/-   ##
==========================================
- Coverage   41.02%   40.90%   -0.13%     
==========================================
  Files         151      151              
  Lines       19954    20020      +66     
==========================================
+ Hits         8187     8189       +2     
- Misses      10639    10704      +65     
+ Partials     1128     1127       -1     
Impacted Files Coverage Δ
cmd/argocd-util/commands/cluster.go 0.00% <0.00%> (ø)
util/kube/portforwarder.go 0.00% <0.00%> (ø)
util/settings/settings.go 46.75% <0.00%> (ø)
server/logout/logout.go 76.92% <0.00%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3604a58...ad98a1a. Read the comment docs.

Copy link
Contributor

@kshamajain99 kshamajain99 left a comment

Choose a reason for hiding this comment

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

LGTM

@alexmt alexmt merged commit 1708a71 into argoproj:master May 27, 2021
@alexmt alexmt deleted the cluster-shards branch May 27, 2021 22:37
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jun 25, 2021
@alexmt alexmt removed the needs-verification PR requires pre-release verification label Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants