Open zeusal opened 8 months ago
I got the same error.
Hello, I would like to work on this issue.
Hello all,
It seems that this is no longer an issue with the current versions of the ArgoCD CLI.
I setup ArgoCD locally with the provided values and added a sample app. I built ArgoCD from source for the CLI commands.
~/argo-cd (master)> alias argocd "go run github.com/argoproj/argo-cd/v2/cmd"
~/argo-cd (master)> argocd version
argocd: v99.99.99+unknown
BuildDate: 1970-01-01T00:00:00Z
GitCommit:
GitTreeState:
GoVersion: go1.22.7
Compiler: gc
Platform: linux/amd64
argocd-server: v2.12.3+6b9cd82
BuildDate: 2024-08-27T11:57:48Z
GitCommit: 6b9cd828c6e9807398869ad5ac44efd2c28422d6
GitTreeState: clean
GoVersion: go1.22.4
Compiler: gc
Platform: linux/amd64
Kustomize Version: v5.4.2 2024-05-22T15:19:38Z
Helm Version: v3.15.2+g1a500d5
Kubectl Version: v0.29.6
Jsonnet Version: v0.20.0
I then compared the output of argocd admin cluster stats
at the latest commit of master
(0573ed79) and at the version specified in this issue, v2.9.3
.
~/argo-cd ((0573ed79))> alias argocd "go run github.com/argoproj/argo-cd/v2/cmd"
~/argo-cd ((0573ed79))> argocd admin cluster stats
SERVER SHARD CONNECTION NAMESPACES COUNT APPS COUNT RESOURCES COUNT
https://kubernetes.default.svc 0 Successful 1 1 367
~/argo-cd ((v2.9.3))> argocd admin cluster stats
SERVER SHARD CONNECTION NAMESPACES COUNT APPS COUNT RESOURCES COUNT
https://kubernetes.default.svc 0 1 0 0
It seems the latest commit on master now picks up the resources in the shard correctly.
Please let me know if I missed something, otherwise I think we can close the issue.
Checklist:
argocd version
.Describe the bug
I do not see the statistics correctly when the cluster uses the round robin algorithm.
The application controller works correctly with round robin (at least I can see round robin in logs.) but argocd cli admin cluster stats not.
To Reproduce
Values:
Expected behavior
I hope to see the values of shards correctly.
Screenshots
Application controller log:
Version
Logs argocd cli
I have been see the code of argocd and I can find the following lines: https://github.com/argoproj/argo-cd/blob/v2.9.3/cmd/argocd/commands/admin/cluster.go#L125C77-L125C101 common.DefaultShardingAlgorithm = LegacyShardingAlgorithm LegacyShardingAlgorithm = "legacy" https://github.com/argoproj/argo-cd/blob/v2.9.3/common/common.go#L118C5-L118C5
does this mean that "admin cluster stats" doesn't work with any other algorithm than "legacy"?
Also, when I have configured the algorithm as legacy, I can see the same information (zero shard, zero apps).