Prevent scheduler from crashing infinitely if apiserver is unreachable

This commit is contained in:
Sam Ghods
2014-10-06 19:24:05 -07:00
parent 65b4247892
commit 16641757ef
2 changed files with 7 additions and 5 deletions

View File

@@ -58,7 +58,10 @@ func main() {
go http.ListenAndServe(net.JoinHostPort(address.String(), strconv.Itoa(*port)), nil)
configFactory := &factory.ConfigFactory{Client: kubeClient}
config := configFactory.Create()
config, err := configFactory.Create()
if err != nil {
glog.Fatalf("Can't create scheduler config: %v", err)
}
s := scheduler.New(config)
s.Run()