Add healthz handlers to the controller manager and scheduler

This commit is contained in:
Brendan Burns
2014-09-12 06:45:39 -07:00
parent cc7999c00a
commit 99f7a4f25d
4 changed files with 51 additions and 3 deletions

View File

@@ -18,8 +18,13 @@ package main
import (
"flag"
"net"
"net/http"
"strconv"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
masterPkg "github.com/GoogleCloudPlatform/kubernetes/pkg/master"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler"
@@ -28,7 +33,9 @@ import (
)
var (
master = flag.String("master", "", "The address of the Kubernetes API server")
master = flag.String("master", "", "The address of the Kubernetes API server")
port = flag.Int("port", masterPkg.SchedulerPort, "The port that the scheduler's http service runs on")
address = flag.String("address", "127.0.0.1", "The address to serve from")
)
func main() {
@@ -44,6 +51,8 @@ func main() {
glog.Fatalf("Invalid -master: %v", err)
}
go http.ListenAndServe(net.JoinHostPort(*address, strconv.Itoa(*port)), nil)
configFactory := &factory.ConfigFactory{Client: kubeClient}
config := configFactory.Create()
s := scheduler.New(config)