mirror of
https://github.com/rancher/rke.git
synced 2025-09-19 10:26:20 +00:00
Use configured docker daemon root dir on kubelet
This commit is contained in:
@@ -216,7 +216,7 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host) v3.Process {
|
||||
"/var/lib/cni:/var/lib/cni:z",
|
||||
"/etc/resolv.conf:/etc/resolv.conf",
|
||||
"/sys:/sys",
|
||||
"/var/lib/docker:/var/lib/docker:rw,z",
|
||||
host.DockerInfo.DockerRootDir + ":" + host.DockerInfo.DockerRootDir + ":rw,z",
|
||||
"/var/lib/kubelet:/var/lib/kubelet:shared,z",
|
||||
"/var/run:/var/run:rw",
|
||||
"/run:/run",
|
||||
|
@@ -4,7 +4,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/rancher/rke/docker"
|
||||
"github.com/rancher/rke/k8s"
|
||||
@@ -29,6 +31,7 @@ type Host struct {
|
||||
ToDelLabels map[string]string
|
||||
ToAddTaints []string
|
||||
ToDelTaints []string
|
||||
DockerInfo types.Info
|
||||
}
|
||||
|
||||
const (
|
||||
|
@@ -60,6 +60,7 @@ func checkDockerVersion(ctx context.Context, h *Host) error {
|
||||
return fmt.Errorf("Can't retrieve Docker Info: %v", err)
|
||||
}
|
||||
logrus.Debugf("Docker Info found: %#v", info)
|
||||
h.DockerInfo = info
|
||||
isvalid, err := docker.IsSupportedDockerVersion(info, K8sVersion)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error while determining supported Docker version [%s]: %v", info.ServerVersion, err)
|
||||
|
Reference in New Issue
Block a user