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 #896

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

ulucinar
Copy link
Collaborator

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:

2023-09-27T22:10:33+03:00       DEBUG   provider-aws    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 with a Role.iam resource.

@ulucinar
Copy link
Collaborator Author

/test-examples="examples/ec2/vpc.yaml"

@ulucinar
Copy link
Collaborator Author

/test-examples="examples/ec2/vpc.yaml"

Copy link
Collaborator

@turkenf turkenf 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 @ulucinar, LGTM.

@ulucinar ulucinar merged commit 37e3795 into crossplane-contrib:main Sep 28, 2023
8 checks passed
@ulucinar ulucinar deleted the poll-jitter branch September 28, 2023 14:48
@ulucinar ulucinar mentioned this pull request Sep 28, 2023
1 task
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