mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 09:47:06 +00:00
Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io> Co-authored-by: Ciprian Hacman <ciprian@hakman.dev> Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
committed by
Ciprian Hacman
parent
03bcfab1a6
commit
07999dac70
@@ -17,10 +17,6 @@ limitations under the License.
|
||||
package options
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/kubelet/config"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
@@ -39,20 +35,8 @@ var (
|
||||
// NewContainerRuntimeOptions will create a new ContainerRuntimeOptions with
|
||||
// default values.
|
||||
func NewContainerRuntimeOptions() *config.ContainerRuntimeOptions {
|
||||
dockerEndpoint := ""
|
||||
if runtime.GOOS != "windows" {
|
||||
dockerEndpoint = "unix:///var/run/docker.sock"
|
||||
}
|
||||
|
||||
return &config.ContainerRuntimeOptions{
|
||||
ContainerRuntime: kubetypes.DockerContainerRuntime,
|
||||
DockerEndpoint: dockerEndpoint,
|
||||
DockershimRootDirectory: "/var/lib/dockershim",
|
||||
PodSandboxImage: defaultPodSandboxImage,
|
||||
ImagePullProgressDeadline: metav1.Duration{Duration: 1 * time.Minute},
|
||||
|
||||
CNIBinDir: "/opt/cni/bin",
|
||||
CNIConfDir: "/etc/cni/net.d",
|
||||
CNICacheDir: "/var/lib/cni/cache",
|
||||
ContainerRuntime: kubetypes.RemoteContainerRuntime,
|
||||
PodSandboxImage: defaultPodSandboxImage,
|
||||
}
|
||||
}
|
||||
|
@@ -93,7 +93,6 @@ import (
|
||||
kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics"
|
||||
"k8s.io/kubernetes/pkg/kubelet/server"
|
||||
"k8s.io/kubernetes/pkg/kubelet/stats/pidlimit"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
utilfs "k8s.io/kubernetes/pkg/util/filesystem"
|
||||
"k8s.io/kubernetes/pkg/util/flock"
|
||||
nodeutil "k8s.io/kubernetes/pkg/util/node"
|
||||
@@ -387,15 +386,6 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea
|
||||
hu := hostutil.NewHostUtil()
|
||||
var pluginRunner = exec.New()
|
||||
|
||||
var dockerOptions *kubelet.DockerOptions
|
||||
if s.ContainerRuntime == kubetypes.DockerContainerRuntime {
|
||||
dockerOptions = &kubelet.DockerOptions{
|
||||
DockerEndpoint: s.DockerEndpoint,
|
||||
RuntimeRequestTimeout: s.RuntimeRequestTimeout.Duration,
|
||||
ImagePullProgressDeadline: s.ImagePullProgressDeadline.Duration,
|
||||
}
|
||||
}
|
||||
|
||||
plugins, err := ProbeVolumePlugins(featureGate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -405,7 +395,6 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea
|
||||
CAdvisorInterface: nil, // cadvisor.New launches background processes (bg http.ListenAndServe, and some bg cleaners), not set here
|
||||
Cloud: nil, // cloud provider might start background processes
|
||||
ContainerManager: nil,
|
||||
DockerOptions: dockerOptions,
|
||||
KubeClient: nil,
|
||||
HeartbeatClient: nil,
|
||||
EventClient: nil,
|
||||
|
Reference in New Issue
Block a user