mirror of https://github.com/k3s-io/k3s
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. @aveshagarwalpull/6/head
commit
f25e34c12f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue