mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 06:59:03 +00:00
Kubelet: Add container runtime option.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user