nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: kyma-project/cli
Pull request #1311 (2022-07-15 08:23:53)

add kubelet arg by default
<!--   Thank you for your contribution. Before you submit the pull request:
1. Follow contributing guidelines, templates, the recommended Git workflow, and any related documentation.
2. Read and submit the required Contributor Licence Agreements (https://github.com/kyma-project/community/blob/main/CONTRIBUTING.md#agreements-and-licenses).
3. Test your changes and attach their results to the pull request.
4. Update the relevant documentation.
-->

**Description**

Changes proposed in this pull request:

- add container sock by default as explicit kubelet argument
- ...
- ...

**Related issue(s)**
<!-- If you refer to a particular issue, provide its number. For example, `Resolves #123`, `Fixes #43`, or `See also #33`. -->
Fixes https://github.com/kyma-project/kyma/issues/14809


Patch:
diff --git a/internal/k3d/k3d.go b/internal/k3d/k3d.go
index fee1ae2d..f12327c9 100644
--- a/internal/k3d/k3d.go
+++ b/internal/k3d/k3d.go
@@ -249,6 +249,7 @@ func getCreateClusterArgs(settings CreateClusterSettings) []string {
 	cmdArgs := []string{
 		"--kubeconfig-switch-context",
 		"--k3s-arg", "--disable=traefik@server:0",
+		"--k3s-arg", "--kubelet-arg=containerd=/run/k3s/containerd/containerd.sock@all:*",
 	}
 	cmdArgs = append(cmdArgs, constructArgs("--registry-use", settings.UseRegistry)...)
 	cmdArgs = append(cmdArgs, constructArgs("--k3s-arg", settings.K3sArgs)...)


Test patch:
diff --git a/internal/k3d/k3d_test.go b/internal/k3d/k3d_test.go
index 1f06c2a0..bf611c17 100644
--- a/internal/k3d/k3d_test.go
+++ b/internal/k3d/k3d_test.go
@@ -145,6 +145,7 @@ func (suite *K3dTestSuite) TestCreateCluster() {
 		"--image", "rancher/k3s:v1.20.11-k3s1",
 		"--kubeconfig-switch-context",
 		"--k3s-arg", "--disable=traefik@server:0",
+		"--k3s-arg", "--kubelet-arg=containerd=/run/k3s/containerd/containerd.sock@all:*",
 		"--registry-use", "k3d-own-registry:5001",
 		"--port", "80:80@loadbalancer",
 		"--port", "443:443@loadbalancer",