mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user