Fixed kubelet /healthz by using healthz package

Fixed #1094
This commit is contained in:
Dawn Chen
2014-08-28 15:34:39 -07:00
parent 27a18684bf
commit 223fb6e610
2 changed files with 3 additions and 6 deletions

View File

@@ -31,6 +31,7 @@ import (
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
"github.com/GoogleCloudPlatform/kubernetes/pkg/httplog"
"github.com/golang/glog"
"github.com/google/cadvisor/info"
@@ -82,7 +83,7 @@ func NewServer(host HostInterface, updates chan<- interface{}) Server {
// InstallDefaultHandlers registers the set of supported HTTP request patterns with the mux
func (s *Server) InstallDefaultHandlers() {
s.mux.HandleFunc("/healthz", s.handleHealth)
healthz.InstallHandler(s.mux)
s.mux.HandleFunc("/container", s.handleContainer)
s.mux.HandleFunc("/containers", s.handleContainers)
s.mux.HandleFunc("/podInfo", s.handlePodInfo)
@@ -97,10 +98,6 @@ func (s *Server) error(w http.ResponseWriter, err error) {
http.Error(w, fmt.Sprintf("Internal Error: %v", err), http.StatusInternalServerError)
}
// handleHealth handles health checking requests against the Kubelet
func (s *Server) handleHealth(w http.ResponseWriter, req *http.Request) {
}
// handleContainer handles container requests against the Kubelet
func (s *Server) handleContainer(w http.ResponseWriter, req *http.Request) {
defer req.Body.Close()