Add a in container exec based health check.

This commit is contained in:
Brendan Burns
2014-08-12 21:33:56 -07:00
parent 053e75d8e9
commit 0caae9c1d4
14 changed files with 207 additions and 26 deletions

View File

@@ -30,6 +30,7 @@ import (
"strings"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/health"
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet"
kconfig "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/config"
@@ -151,6 +152,10 @@ func main() {
*rootDirectory,
*syncFrequency)
health.AddHealthChecker("exec", health.NewExecHealthChecker(k))
health.AddHealthChecker("http", health.NewHTTPHealthChecker(&http.Client{}))
health.AddHealthChecker("tcp", &health.TCPHealthChecker{})
// start the kubelet
go util.Forever(func() { k.Run(cfg.Updates()) }, 0)