Kubelet: Add container runtime option.

This commit is contained in:
Victor Marmol
2015-05-01 14:24:07 -07:00
parent 1a8845af61
commit d9d61c3511
2 changed files with 19 additions and 2 deletions

View File

@@ -120,7 +120,8 @@ func NewMainKubelet(
nodeStatusUpdateFrequency time.Duration,
resourceContainer string,
osInterface kubecontainer.OSInterface,
cgroupRoot string) (*Kubelet, error) {
cgroupRoot string,
containerRuntime string) (*Kubelet, error) {
if rootDirectory == "" {
return nil, fmt.Errorf("invalid root directory %q", rootDirectory)
}
@@ -240,6 +241,15 @@ func NewMainKubelet(
} else {
klet.networkPlugin = plug
}
// TODO(vmarmol,yjhong): Use container runtime.
// Initialize the runtime.
switch containerRuntime {
case "docker":
// Only supported one for now, continue.
default:
return nil, fmt.Errorf("unsupported container runtime %q specified", containerRuntime)
}
containerManager := dockertools.NewDockerManager(
dockerClient,
recorder,