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

Use Lease for leader election #4276

Merged
merged 1 commit into from Oct 24, 2023
Merged

Use Lease for leader election #4276

merged 1 commit into from Oct 24, 2023

Conversation

lucacome
Copy link
Member

Proposed changes

This PR removes the need for a configmap for leader election by using a lease. It also creates a Role file to grant the necessary permissions.

@lucacome lucacome self-assigned this Aug 21, 2023
@lucacome lucacome requested a review from a team as a code owner August 21, 2023 22:01
@github-actions github-actions bot added enhancement Pull requests for new features/feature enhancements helm_chart Pull requests that update the Helm Chart labels Aug 21, 2023
@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #4276 (7626559) into main (9dcd4cc) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #4276      +/-   ##
==========================================
- Coverage   52.12%   52.10%   -0.02%     
==========================================
  Files          59       59              
  Lines       16956    16958       +2     
==========================================
- Hits         8838     8836       -2     
- Misses       7821     7825       +4     
  Partials      297      297              
Files Coverage Δ
internal/k8s/leader.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@shaun-nx shaun-nx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a local test of this and it worked perfectly.

Not only that, the IC acquired the lease for leader election right at the start. This normally took about 15-20 seconds after the IC started.

Great stuff Luca!

@shaun-nx
Copy link
Contributor

@lucacome can you create and attach an issue for this PR as well? Thanks!

@lucacome lucacome requested a review from a team September 26, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements helm_chart Pull requests that update the Helm Chart
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

None yet

3 participants