Merge pull request #60524 from dims/temp-fix-for-kube-scheduler-leader-election

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Temporary fix for LeaderElect for kube-scheduler

**What this PR does / why we need it**:

kube-controller-manager defaults --leader-elect to true. We should
do the same for kube-scheduler. kube-scheduler used to have this
set to true, but it got lost during refactoring:

efb2bb71cd

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #59729

**Special notes for your reviewer**:

**Release note**:

```release-note
kube-scheduler: restores default leader election behavior. leader-elect command line parameter should "true"
```
This commit is contained in:
Kubernetes Submit Queue 2018-03-01 01:20:58 -08:00 committed by GitHub
commit 58731ae627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,6 +152,9 @@ func NewOptions() (*Options, error) {
return nil, err
}
// TODO: we should fix this up better (PR 59732)
o.config.LeaderElection.LeaderElect = true
return o, nil
}