mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Merge pull request #106907 from cyclinder/remove_dockershim_flags
Clean up dockershim flags in the kubelet
This commit is contained in:
@@ -200,9 +200,6 @@ start_kubelet --kubeconfig "${KUBELET_KUBECONFIG}" \
|
||||
--kubelet-cgroups=/kubelet \
|
||||
--system-cgroups=/system \
|
||||
--cgroup-root=/ \
|
||||
"--network-plugin=${NETWORK_PLUGIN}" \
|
||||
"--cni-conf-dir=${CNI_CONF_DIR}" \
|
||||
"--cni-bin-dir=${CNI_BIN_DIR}" \
|
||||
--v=$log_level \
|
||||
--logtostderr
|
||||
|
||||
|
@@ -280,28 +280,6 @@ func (e *E2EServices) startKubelet() (*server, error) {
|
||||
cmdArgs = append(cmdArgs, "--dynamic-config-dir", dynamicConfigDir)
|
||||
}
|
||||
|
||||
// Enable kubenet by default.
|
||||
cniBinDir, err := getCNIBinDirectory()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cniConfDir, err := getCNIConfDirectory()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cniCacheDir, err := getCNICacheDirectory()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cmdArgs = append(cmdArgs,
|
||||
"--network-plugin=kubenet",
|
||||
"--cni-bin-dir", cniBinDir,
|
||||
"--cni-conf-dir", cniConfDir,
|
||||
"--cni-cache-dir", cniCacheDir)
|
||||
|
||||
// Keep hostname override for convenience.
|
||||
if framework.TestContext.NodeName != "" { // If node name is specified, set hostname override.
|
||||
cmdArgs = append(cmdArgs, "--hostname-override", framework.TestContext.NodeName)
|
||||
@@ -445,33 +423,6 @@ func createKubeconfigCWD() (string, error) {
|
||||
return kubeconfigPath, nil
|
||||
}
|
||||
|
||||
// getCNIBinDirectory returns CNI directory.
|
||||
func getCNIBinDirectory() (string, error) {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(cwd, "cni", "bin"), nil
|
||||
}
|
||||
|
||||
// getCNIConfDirectory returns CNI Configuration directory.
|
||||
func getCNIConfDirectory() (string, error) {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(cwd, "cni", "net.d"), nil
|
||||
}
|
||||
|
||||
// getCNICacheDirectory returns CNI Cache directory.
|
||||
func getCNICacheDirectory() (string, error) {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return filepath.Join(cwd, "cni", "cache"), nil
|
||||
}
|
||||
|
||||
// getDynamicConfigDir returns the directory for dynamic Kubelet configuration
|
||||
func getDynamicConfigDir() (string, error) {
|
||||
cwd, err := os.Getwd()
|
||||
|
Reference in New Issue
Block a user