Skip to content

Commit

Permalink
Merge pull request #3940 from mcristina422/patch-1
Browse files Browse the repository at this point in the history
Release leader election lock on shutdown
  • Loading branch information
k8s-ci-robot authored May 4, 2021
2 parents 6c4101b + 4cf9a98 commit 200415e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cluster-autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,11 @@ func main() {
}

leaderelection.RunOrDie(ctx.TODO(), leaderelection.LeaderElectionConfig{
Lock: lock,
LeaseDuration: leaderElection.LeaseDuration.Duration,
RenewDeadline: leaderElection.RenewDeadline.Duration,
RetryPeriod: leaderElection.RetryPeriod.Duration,
Lock: lock,
LeaseDuration: leaderElection.LeaseDuration.Duration,
RenewDeadline: leaderElection.RenewDeadline.Duration,
RetryPeriod: leaderElection.RetryPeriod.Duration,
ReleaseOnCancel: true,
Callbacks: leaderelection.LeaderCallbacks{
OnStartedLeading: func(_ ctx.Context) {
// Since we are committing a suicide after losing
Expand Down

0 comments on commit 200415e

Please sign in to comment.