Skip to content

Commit

Permalink
fix: remove --containerd Kubelet cAdvisor arg.
Browse files Browse the repository at this point in the history
This patch removes the passing of the `--containerd` argument
(value should be path to containerd socket) to `kubelet`.

This argument is actually not a kubelet argument per se, but instead it
is a cAdvisor argument (1) which was accidentally transparently declared
and shipped in kubelet a very long time ago, but had been explicitly
declared within kubelet and marked deprecated since 2017 (2).

[1] https://github.com/google/cadvisor/blob/3888dda254a8fa12f1c96be24ffdc33288ea9071/container/containerd/factory.go#L34
[2] https://github.com/kubernetes/kubernetes/pull/57613/files#diff-fecc7baa0b61f11d37dfc453aef25acca98866e1924f7765ba5592ca58fc3045R143

Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
aznashwan committed Nov 23, 2024
1 parent 17491b4 commit 3fd082a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/k8s/pkg/k8sd/setup/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func kubelet(snap snap.Snap, hostname string, nodeIP net.IP, clusterDNS string,
"--authentication-token-webhook": "true",
"--client-ca-file": filepath.Join(snap.KubernetesPKIDir(), "client-ca.crt"),
"--container-runtime-endpoint": snap.ContainerdSocketPath(),
"--containerd": snap.ContainerdSocketPath(),
"--cgroup-driver": "systemd",
"--eviction-hard": "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'",
"--fail-swap-on": "false",
Expand Down
6 changes: 0 additions & 6 deletions src/k8s/pkg/k8sd/setup/kubelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down Expand Up @@ -119,7 +118,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down Expand Up @@ -177,7 +175,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down Expand Up @@ -226,7 +223,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down Expand Up @@ -284,7 +280,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down Expand Up @@ -341,7 +336,6 @@ func TestKubelet(t *testing.T) {
{key: "--authentication-token-webhook", expectedVal: "true"},
{key: "--client-ca-file", expectedVal: filepath.Join(s.Mock.KubernetesPKIDir, "client-ca.crt")},
{key: "--container-runtime-endpoint", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--containerd", expectedVal: s.Mock.ContainerdSocketPath},
{key: "--cgroup-driver", expectedVal: "systemd"},
{key: "--eviction-hard", expectedVal: "'memory.available<100Mi,nodefs.available<1Gi,imagefs.available<1Gi'"},
{key: "--fail-swap-on", expectedVal: "false"},
Expand Down

0 comments on commit 3fd082a

Please sign in to comment.