Skip to content

Commit

Permalink
Migrates leader election to Lease API
Browse files Browse the repository at this point in the history
I ran `make test` and got no errors back, I also ran the `tests/e2e/test.sh`
script and the process completed successfully. I believe this change completes
the migration to the Lease API but I'm not entirely certain. If someone can
verify this and/or provide any other feedback I'll greatly appreciate it!
  • Loading branch information
snOm3ad committed Sep 8, 2021
1 parent 853cdd7 commit 4151007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,11 +864,11 @@ func (ctrl *ProvisionController) Run(ctx context.Context) {
go ctrl.volumeStore.Run(ctx, DefaultThreadiness)

if ctrl.leaderElection {
rl, err := resourcelock.New("endpoints",
rl, err := resourcelock.New("leases",
ctrl.leaderElectionNamespace,
strings.Replace(ctrl.provisionerName, "/", "-", -1),
ctrl.client.CoreV1(),
nil,
ctrl.client.CoordinationV1(),
resourcelock.ResourceLockConfig{
Identity: ctrl.id,
EventRecorder: ctrl.eventRecorder,
Expand Down

0 comments on commit 4151007

Please sign in to comment.