Merge pull request #51535 from deads2k/scheduler-02-no-http

Automatic merge from submit-queue (batch tested with PRs 47054, 50398, 51541, 51535, 51545)

allow disabling the scheduler port

Unlike the `kube-apiserver`, the scheduler can function without exposing a status port.  This provides the option to disable it by explicitly passing a `-1`.  This does not change default behavior.

@aveshagarwal
pull/6/head
Kubernetes Submit Queue 2017-08-30 01:51:35 -07:00 committed by GitHub
commit f25e34c12f
1 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,9 @@ func Run(s *options.SchedulerServer) error {
return fmt.Errorf("error creating scheduler: %v", err)
}
go startHTTP(s)
if s.Port != -1 {
go startHTTP(s)
}
stop := make(chan struct{})
defer close(stop)