Skip to content

Commit

Permalink
Merge pull request #367 from tnozicka/fix-ks-release-on-cancel
Browse files Browse the repository at this point in the history
Bug 1877793: Force releasing the lock on exit for KS
  • Loading branch information
openshift-merge-robot committed Sep 22, 2020
2 parents 6df029e + f606fd8 commit 8a39924
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/kube-scheduler/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func Run(ctx context.Context, cc *schedulerserverconfig.CompletedConfig, sched *
}
},
}
cc.LeaderElection.ReleaseOnCancel = true
leaderElector, err := leaderelection.NewLeaderElector(*cc.LeaderElection)
if err != nil {
return fmt.Errorf("couldn't create leader elector: %v", err)
Expand Down

0 comments on commit 8a39924

Please sign in to comment.