Skip to content
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

Fine tune watch selectors for less memory usage #1929

Merged
merged 7 commits into from
Feb 4, 2025
Merged

Conversation

pepov
Copy link
Member

@pepov pepov commented Jan 27, 2025

The point is to introduce a backwards compatible option to reduce memory usage in large environments.

The PR introduces two new operator flags:

  • watch-labeled-children: only watch child resources (pods, daemonsets, configmaps, etc) created by the operator with specific labels to avoid watching resources the operator is not concerned with. This option will be enabled by default in a future new minor version.
  • watch-labeled-secrets: only watch secrets with logging.banzaicloud.io/watch: enabled label. This has the risk of breaking the operator if certain secrets are not labeled correctly. This option will be enabled by default in a future new major version.

Fixes: #1930 in 5f5aee0

@pepov pepov requested a review from csatib02 January 27, 2025 17:30
Copy link
Member

@csatib02 csatib02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pepov pepov requested a review from OverOrion January 29, 2025 08:55
@pepov pepov force-pushed the watch-selectors branch 3 times, most recently from 29c271b to 8517ed5 Compare January 29, 2025 17:31
Copy link
Member

@csatib02 csatib02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks for this feature!

pepov and others added 3 commits February 3, 2025 09:46
Signed-off-by: Bence Csati <[email protected]>
@csatib02 csatib02 added the enhancement New feature or request label Feb 3, 2025
Signed-off-by: Bence Csati <[email protected]>
@pepov pepov merged commit e301023 into master Feb 4, 2025
24 checks passed
@pepov pepov deleted the watch-selectors branch February 4, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logging-operator consumes memory for objects in other namespaces despite -watch-namespace
3 participants