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

refactor: allow custom predicates as option #34

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Conversation

KevFan
Copy link
Contributor

@KevFan KevFan commented Sep 27, 2024

Description

Related to: Kuadrant/kuadrant-operator#885

Allow passing custom predicates as an option to the watch func for the state reconciler.

This removes setting the &ctrlruntimepredicate.TypedGenerationChangedPredicate[T]{} predicate by default as this may not be the functionality a user expects, as events revolving around status updates are skipped.

For example, a user might want to receive only status change events for some resources (such as in Kuadrant Operator that watches status change of Certificate, Issuer & ClusterIssuer to calculate the status for TLSPolicy)

guicassolato
guicassolato previously approved these changes Sep 27, 2024
Copy link
Contributor

@guicassolato guicassolato left a comment

Choose a reason for hiding this comment

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

This is great, @KevFan. Thank you!

@KevFan KevFan merged commit fdcc3c3 into Kuadrant:main Sep 30, 2024
6 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.

3 participants