[BUG]: High load on API Server
kosmoz opened this issue · 0 comments
kosmoz commented
Checklist
- I've searched for similar issues and couldn't find anything matching
- I've included steps to reproduce the behavior
Glasskube Version
v0.13.8
Kubernetes Version
v1.28
Host OS and its Version
No response
Steps to reproduce
Start the operator in Kubernetes cluster with tight resource limits. You might have to restart it a couple of times, this error does not occur deterministically.
Expected behaviour
No errors.
Actual behaviour
No response
Additional Information
In the scenario outlined above, there can be errors during startup. This is because the operator creates a lot of event sources at the same time which overloads the API server or makes it take too long to respond. Making matters worse, a number of event sources is not constrained using label selectors, so API has to return much more than is actually required.
The solution is to only start as many event sources as needed and add label selectors where they are missing.