argocd-image-updater
argocd-image-updater copied to clipboard
func (client *k8sClient) ListApplications() in v1.NamespaceAll: kube-api CPU usage on big installations (~8K applications)
Hi!
- Since v0.15.0 calling GetApplication() triggers in turn ListApplications() in v1.NamespaceAll.
- 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):
K8S API logs (for 1 minute):
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) ?