-
Notifications
You must be signed in to change notification settings - Fork 11
operator: Add initial concurrent reconciliation support #724
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
base: main
Are you sure you want to change the base?
Conversation
40716b2
to
7c3618e
Compare
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.
Looks good! Could we add some tests for ConcurrentWatcher
since it's in the path for handling all events going forward?
b328b61
to
7cac3dd
Compare
I have added tests for |
Signed-off-by: Prem Saraswat <[email protected]>
Signed-off-by: Prem Saraswat <[email protected]>
Signed-off-by: Prem Saraswat <[email protected]>
Signed-off-by: Prem Saraswat <[email protected]>
7ac1804
to
7a30859
Compare
7a30859
to
66683eb
Compare
…rController Signed-off-by: Prem Saraswat <[email protected]>
What
This PR adds support for reconciling events concurrently in
operator.InformerController
. By default only1
worker would be run, to maintain backward compatibility of processing the events sequentially.This is done with the help of a new
ResourceWatcher
implementation calledConcurrentWatcher
, which runs multiple workers in the background and shards the incoming events between them. For every event, a hash mod is calculated on the identifier, allowing us to deliver events for same object to the same worker. This is done to maintain the per object in-order guarantee for events by Kubernetes.Why
This is needed for https://github.com/grafana/cloud-apps-platform/issues/883