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

Run multiple replicas of the informer #27

Merged
merged 1 commit into from
Mar 24, 2024
Merged

Conversation

norbjd
Copy link
Owner

@norbjd norbjd commented Mar 24, 2024

Before, it was only possible to run 1 replica of the informer because there could be some race conditions.

This PR adds a coordination lease used by all informers, so it's possible to define multiple replicas. Only one replica will be the leader, but if it goes down, at least another one should take the lead.

The lease logic is based on this example: https://github.com/kubernetes/client-go/blob/v0.29.3/examples/leader-election/main.go.

@norbjd norbjd self-assigned this Mar 24, 2024
@norbjd norbjd merged commit 8074b20 into main Mar 24, 2024
6 checks passed
@norbjd norbjd deleted the informer-multiple-replicas branch March 24, 2024 16:38
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.

1 participant