Skip to content

Commit 40f2d1b

Browse files
authored
e2e test support microk8s
microk8s run kubelet service as `snap.microk8s.daemon-kubelet.service`, instead of `kubelet.service`. so e2e should use `systemctl list-units *kubelet* --state=running` to find out kubelet service of microk8s.
1 parent 66334f0 commit 40f2d1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e_node/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func getCRIClient() (internalapi.RuntimeService, internalapi.ImageManagerService
375375

376376
// TODO: Find a uniform way to deal with systemctl/initctl/service operations. #34494
377377
func findRunningKubletServiceName() string {
378-
stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput()
378+
stdout, err := exec.Command("sudo", "systemctl", "list-units", "*kubelet*", "--state=running").CombinedOutput()
379379
framework.ExpectNoError(err)
380380
regex := regexp.MustCompile("(kubelet-\\w+)")
381381
matches := regex.FindStringSubmatch(string(stdout))

0 commit comments

Comments
 (0)