Merge pull request #25771 from sjpotter/fs-info

Automatic merge from submit-queue

kubelet/cadvisor: Refactor cadvisor disk stat/usage interfaces.

basically

1) cadvisor struct will know what runtime the kubelet is, passed in via additional argument to New()

2) rename cadvisor wrapper function to DockerImagesFsInfo() to ImagesFsInfo() and have linux implementation choose a label based on the runtime inside the cadvisor struct

2a) mock/fake/unsupported modified to take the same additional argument in New()

3) kubelet's wrapper for the cadvisor wrapper is renamed in parallel

4) make all tests use new interface
This commit is contained in:
k8s-merge-robot
2016-05-22 03:08:59 -07:00
22 changed files with 76 additions and 63 deletions

View File

@@ -99,7 +99,7 @@ func containerRuntime() error {
}
// Setup cadvisor to check the container environment
c, err := cadvisor.New(0 /*don't start the http server*/)
c, err := cadvisor.New(0 /*don't start the http server*/, "docker")
if err != nil {
return printError("Container Runtime Check: %s Could not start cadvisor %v", failed, err)
}