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

Configure a default poll jitter for the controllers #557

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

turkenf
Copy link
Collaborator

@turkenf turkenf commented Sep 27, 2023

Description of your changes

This PR proposes configuring a default poll jitter of 5% of the poll interval for up-to-date resources so that if the reconciliations of the resources are synchronized for some reason (e.g., pod restart), they will not be queued for reconciliation at the same moment. Also as the provider keeps reconciling the resources, the reconciliations will be randomly distributed. We initially start with a poll jitter of 5% of the poll interval and currently this interval is not configurable via the command-line options not to increase the configuration complexity. If there's need to configure the jitter for different environments, then we can add this option in a future PR.

The configured jitter is also dumped in the debug logs when the provider is starting:

DEBUG	provider-azure	Starting	{"sync-interval": "1h0m0s", "poll-interval": "10m0s", "poll-jitter": "30s", "max-reconcile-rate": 10}

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Tested manually on this PR

@turkenf
Copy link
Collaborator Author

turkenf commented Sep 27, 2023

/test-examples="examples/azure/resourcegroup.yaml"

@turkenf
Copy link
Collaborator Author

turkenf commented Sep 27, 2023

/test-examples="examples/azure/resourcegroup.yaml"

@turkenf
Copy link
Collaborator Author

turkenf commented Sep 28, 2023

/test-examples="examples/azure/resourcegroup.yaml"

Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

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

Thank you @turkenf, lgtm.

@turkenf turkenf merged commit 9ffc153 into crossplane-contrib:main Sep 28, 2023
8 checks passed
@turkenf turkenf deleted the add-jitter branch September 28, 2023 15:30
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.

2 participants