-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Do not reschedule, if already scheduled in the next MinInterval #2609
Do not reschedule, if already scheduled in the next MinInterval #2609
Conversation
|
Welcome @claudiumocanu! |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale We're hit by the exact issue that this PR fixes, and would love to see it land. In the meantime, we'll probably have to live off a fork that pulls this change in. |
/lgtm |
@szuecs: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiumocanu thanks for your PR, just one fix for the comment and we can ship this.
Co-authored-by: Raffaele Di Fazio <[email protected]>
/lgtm |
/assign Raffo |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: claudiumocanu, Raffo, szuecs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
When cfg.UpdateEvents is true, any service or ingress change in the Source, is invoking ctrl.ScheduleRunOnce, allowing a reconciliation to be eventually scheduled earlier than cfg.Interval, but not more often than cfg.MinEventSyncInterval.
The problem happens in a scenario where services or ingresses changes happen more often than cfg.MinEventSyncInterval, because the Controller.nextRunAt is recalculated as now + cfg.MinEventSyncInterval, allowing the next reconciliation to be pushed forward, even if it is already planned to happen, eventually even further than cfg.Interval and virtually forever.
For the sake of the example, in a very busy K8s cluster, in which one service is updated once every second, while the cfg.MinEventSyncInterval set to something bigger than one second, the reconciliation never happens.
The change I am submitting for your review, blocks the Controller.nextRunAt from being recalculated, if a reconciliation is already planned to happen sooner than the cfg.MinEventSyncInterval.
Alternatively, the cfg.Interval could be used instead of cfg.MinEventSyncInterval, as a maximum amount of time that a reconciliation is allowed to be delayed.
Fixes #ISSUE.
There is no issue opened on this topic.
Checklist
PS: This is my first PR. Looking forward for any feedback. Thanks!