argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

func (client *k8sClient) ListApplications() in v1.NamespaceAll: kube-api CPU usage on big installations (~8K applications)

Open amorozkin opened this issue 7 months ago • 5 comments

Hi!

  1. Since v0.15.0 calling GetApplication() triggers in turn ListApplications() in v1.NamespaceAll.
  2. GetApplication() is called multiple times in row.

These all caues very high resource (CPU mainly) usage on k8s masters as a result. In our case (Muilt-cluster Argocd instance v2.14.10 + 8K argоcd apps) it looks like that on 6 CPU core masters (dedicated argocd k8s cluster, v1.29):

Image

K8S API logs (for 1 minute): Image

We are not using "Application in any namespase" feature currently so it's ok for us to switch back to using v0.14.0.

As of 0.15.0+ versions, may be there is a need for optimization - say adding redis cache on application side (with 1 min TTL for ListApplications() for example) ?

amorozkin avatar Apr 22 '25 13:04 amorozkin