Closed munnerz closed 6 years ago
/test e2e
@wallrj this is ready for review now.
I think the best way for us to write tests for this is probably with integration tests for GenericPilot itself. The leaderelection package doesn't really need much testing as it is largely just a convenient proxy to the upstream kubernetes package.
We can then provide our own SyncFunc and LeaderElectedSyncFunc, run two instances of GenericPilot and ensure that only one of them receives calls to LeaderElectedSyncFunc.
/test e2e
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: wallrj
The full list of commands accepted by this bot can be found here.
/test all [submit-queue is verifying that this PR is safe to merge]
Automatic merge from submit-queue.
What this PR does / why we need it:
Adds a leaderelection package and implements leader election in the GenericPilot.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Closes #97
Release note: