kubelet: remove the pleg health check from healthz/
If docker hangs, we don't want kubelet to get killed as well.
This commit is contained in:
@@ -159,8 +159,6 @@ func (fk *fakeKubelet) StreamingConnectionIdleTimeout() time.Duration {
|
||||
return fk.streamingConnectionIdleTimeoutFunc()
|
||||
}
|
||||
|
||||
func (fk *fakeKubelet) PLEGHealthCheck() (bool, error) { return fk.plegHealth, nil }
|
||||
|
||||
// Unused functions
|
||||
func (_ *fakeKubelet) GetContainerInfoV2(_ string, _ cadvisorapiv2.RequestOptions) (map[string]cadvisorapiv2.ContainerInfo, error) {
|
||||
return nil, nil
|
||||
@@ -869,18 +867,6 @@ func TestSyncLoopCheck(t *testing.T) {
|
||||
assertHealthFails(t, fw.testHTTPServer.URL+"/healthz", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
func TestPLEGHealthCheck(t *testing.T) {
|
||||
fw := newServerTest()
|
||||
defer fw.testHTTPServer.Close()
|
||||
fw.fakeKubelet.hostnameFunc = func() string {
|
||||
return "127.0.0.1"
|
||||
}
|
||||
|
||||
// Test with failed pleg health check.
|
||||
fw.fakeKubelet.plegHealth = false
|
||||
assertHealthFails(t, fw.testHTTPServer.URL+"/healthz", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
// returns http response status code from the HTTP GET
|
||||
func assertHealthIsOk(t *testing.T, httpURL string) {
|
||||
resp, err := http.Get(httpURL)
|
||||
|
Reference in New Issue
Block a user