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

🐛 fix: reduce unnecessary caching and remove predicate from dynamic watches #963

Merged

Conversation

joelanford
Copy link
Member

Our cache configuration resulted in watching all cluster-scoped resources for each cluster-scoped resource that shows up in a ClusterExtension. Now, we only watch:

  • All ClusterExtensions
  • All ClusterCatalogs
  • All objects in the systemNamespace
  • All other objects that specifically match the dependentPredicate

This commit also removes the dependent predicate so that we reconcile for any change to managed resources. This is important to ensure that future features (like health checking) can account for any change to managed operator objects.

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

…ches

Our cache configuration resulted in watching all cluster-scoped
resources for each cluster-scoped resource that shows up in a
ClusterExtension. Now, we only watch:
- All ClusterExtensions
- All ClusterCatalogs
- All objects in the systemNamespace
- All other objects that specifically match the dependentPredicate

This commit also removes the dependent predicate so that we reconcile
for any change to managed resources. This is important to ensure that
future features (like health checking) can account for any change to
managed operator objects.

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@joelanford joelanford requested a review from a team as a code owner June 21, 2024 15:33
Copy link

netlify bot commented Jun 21, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 65aa63c
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66759d3e0bbda100085de84b
😎 Deploy Preview https://deploy-preview-963--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

return true
}
crhandler.EnqueueRequestsFromMapFunc(clusterExtensionRequestsForCatalog(mgr.GetClient(), mgr.GetLogger())),
builder.WithPredicates(predicate.Funcs{
Copy link
Contributor

@perdasilva perdasilva Jun 21, 2024

Choose a reason for hiding this comment

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

A tab walks into a bar sits down. The barkeep asks him, "why the long space?"

Copy link
Member Author

Choose a reason for hiding this comment

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

😄 Yeah, the formatting looks weird because the predicate needs to go with the ClusterCatalog watch, and it means it all gets indented by an extra tab.

Copy link
Contributor

@perdasilva perdasilva left a comment

Choose a reason for hiding this comment

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

lgtm

@joelanford joelanford added this pull request to the merge queue Jun 21, 2024
Merged via the queue into operator-framework:main with commit 16cf334 Jun 21, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants