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

Add DesiredStateChanged event filter to filter out status updates #329

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

ravilr
Copy link
Contributor

@ravilr ravilr commented Jan 6, 2025

Description of your changes

  • Added an event filter using the DesiredStateChanged predicate to the resource controllers so that updates to only labels, annotations (Crossplane's create pending/failed annotations will be ignored) and the spec will result in reconcile requests.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • make test

  • without this change, when a Object resource's resourceVersion keeps changing due to changing metadata.managedFields of the managed K8s resource in status.atProvider, results in repeated reconciles of such Object in a short period of time( teal colored peaks in the below metrics graph). With this change, such status updates doesn't result in reconcile spins (green plot, after the change):

Screenshot 2025-01-06 at 1 11 39 PM

@ravilr
Copy link
Contributor Author

ravilr commented Jan 6, 2025

@bobh66 PTAL. we observe considerable reconciles spinning behavior leading to K8s client qps peaks, without filtering out the status.

Do you have more details on what you observed in #110 (comment) with the event filter enabled ?

@bobh66
Copy link
Contributor

bobh66 commented Jan 23, 2025

LGTM

Copy link
Collaborator

@turkenh turkenh left a comment

Choose a reason for hiding this comment

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

Thanks @ravilr, looking good to me as well.

@turkenh turkenh merged commit 4c7f2d6 into crossplane-contrib:main Jan 27, 2025
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