Draft
Conversation
Signed-off-by: Adrian Fernandez de la Torre <adri1197@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduce an opt-in CacheFluxObjects feature flag that enables caching of FluxCD objects (GitRepository, Kustomization, HelmRelease, etc.) via Kubernetes informers. Currently, the notification-controller makes direct API calls to fetch FluxCD objects when matching Alert event sources with label selectors. In clusters with many Alerts and FluxCD resources, this creates performance bottlenecks and increases API server load. By enabling this feature flag, FluxCD objects are cached in memory through informers, making reads significantly faster and reducing API server pressure. The implementation conditionally registers FluxCD controller schemes before manager creation, allowing controller-runtime to automatically create informers for these types. When disabled (default), the current behavior is maintained with no additional memory or RBAC requirements. When enabled, users gain improved performance at the cost of increased memory usage and additional RBAC permissions (list/watch on FluxCD resources). Enable with
--feature-gates=CacheFluxObjects=true.