Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Summary: This adds leader election to the agent - currently it is just wrapped around the metrics reporter. One leader is chosen in a cluster, and will hold on to that leader indefinitely. The only way a leader should be lost is if a pod goes down, or if for some reason execution hangs long enough that it is unable to update the leader lease. Pods not elected leader will poll with a duration of the leaseDurationInSeconds. Or 5 minutes if that for whatever reason is not set. Polling to become the leader has a built in jitter used by a random interval of ten seconds. See: leader-election-leases.yaml for lease definition. Leases don't have a concept of expire - this must be done with manually checking. The metrics reporter stream is set to be created, and then blocked until such time it becomes the leader. Test plan: Integration Test Unit Test Manual Testing via observing leader logs Ref: LOG-13434 * removed a file * pr feedback * fixed log level * lint Co-authored-by: James <james.bloom@mezmo.com>
- Loading branch information