8000 Use Lease for leader election by lucacome · Pull Request #4276 · nginx/kubernetes-ingress · GitHub
[go: up one dir, main page]

Skip to content

Conversation

lucacome
Copy link

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 force-pushed the feat/use-lease-election branch from 08f9a00 to 7626559 Compare September 26, 2023 22:45
@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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0