Remove global map from healthz

It currently is impossible to use two healthz handlers on different
ports in the same process.  This removes the global variables in favor
of requiring the consumer to specify all health checks up front.
This commit is contained in:
Clayton Coleman
2015-03-19 18:56:29 -04:00
parent 1ce5dda691
commit 015bc3b7bd
9 changed files with 100 additions and 73 deletions

View File

@@ -26,12 +26,17 @@ import (
"runtime"
"github.com/GoogleCloudPlatform/kubernetes/cmd/kube-controller-manager/app"
"github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/spf13/pflag"
)
func init() {
healthz.DefaultHealthz()
}
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := app.NewCMServer()