Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Decrease 50x footprint by using filtered cache. fixes #4588.
When deploy controller to clusters witch have large amount of resources like
deployments
/pods
/secrects
/ingresses
, some controller is consume more memory than needed.Key problem:
When controller manager start, it will watch and cache all needed resource it owns for performance reason.
When cluster have thousand of resources, the cache memory increases whenever custom resource's count.
Solution:
With terminal/adminer controller usage, controller manager only want to watch resources we created and/or managed for update/delete etc events.
So add labels to controller managed resources and then create cache filtered only for those labeled resources, can reduce cache memory usage to match real custom resource's count, and also reduce api-server call response to save internal network bandwidth.