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 global poll interval flag #283

Merged
merged 2 commits into from
Aug 19, 2021

Conversation

hasheddan
Copy link
Member

@hasheddan hasheddan commented Aug 18, 2021

Description of your changes

Adds a --poll-interval flag to provider, which is passed to all controllers to set their polling interval in the reconciliation happy path.

Note to reviewers: these changes are almost entirely find and replace.

xref crossplane/crossplane-runtime#253
Fixes #282

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

See crossplane-contrib/provider-aws#741 for testing steps.

func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter) error {
func Setup(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, poll time.Duration) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

The passing of the poll interval through the various nested syncers / updaters in the storage controllers is not super clean, but I opted to go for path of least resistance here since these controllers need to be refactored to use the managed reconciler anyway.

Adds a flag to provider entrypoint for setting the happy path poll
interval. Defaults to 1 minute.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Passes the value of the poll interval flag to all controllers such that
it can be set globally via flag.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
@hasheddan hasheddan merged commit faab5b5 into crossplane-contrib:master Aug 19, 2021
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.

Add global poll interval flag
2 participants