-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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(appset): make K8s client configurable #16945 #18623
feat(appset): make K8s client configurable #16945 #18623
Conversation
Signed-off-by: Alexy Mantha <[email protected]>
Looking at the Application controller, these settings do not seem to be documented and are not exposed other than by the environment variable. I'm not sure if it should stay like that for the ApplicationSet as well. I'll be happy to add some documentation and expose these options correctly if you think it should be done, but in that case it should also be done for the Application controller IMO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jannfis Seems like you worked on that part in the past with #8404 so maybe you can think of an issue with this, but so far LGTM.
@alexymantha see issue #8527 for documentation. If you want to tackle it, it could be in this one or another PR.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18623 +/- ##
==========================================
+ Coverage 50.26% 50.30% +0.04%
==========================================
Files 315 315
Lines 43125 43130 +5
==========================================
+ Hits 21677 21698 +21
+ Misses 18963 18944 -19
- Partials 2485 2488 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexymantha for the changes. LGTM!
Signed-off-by: Alexy Mantha <[email protected]>
Signed-off-by: Alexy Mantha <[email protected]> Signed-off-by: Javier Solana <[email protected]> Signed-off-by: Javier Solana <[email protected]>
There is currently no way to tweak the Kubernetes client configuration for the
applicationset-controller
, it defaults to the values set incontroller-runtime
:https://github.com/kubernetes-sigs/controller-runtime/blob/1f5b39fa59d15fae78e521c9c9f2acabbbb3ea17/pkg/client/config/config.go#L101-L106
which are pretty low.
We use the ApplicationSet controller with the cluster generators pretty heavily which means we call
ListClusters
very frequently and we started to get throttled by the client. It was causing the ApplicationSet controller to not be able to process the ApplicationSets fast enough due to the limit of default limit of 30 QPS which caused the queue to slowly build up over time and the ApplicationSet controller was never able to catch up.Using this PR, I was able to increase the rate limits and fix the performance issues we were having:
For consistency, I think it makes sense to apply the same default client config to the ApplicationSet controller that is applied to the Application controller.
Here is the diff in the client config when applying the same default as the Application Controller:
This has been running on our ArgoCD instance for almost a week without any issues.
Checklist:
Closes #16945