mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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.
This commit is contained in:
parent
66334f02e8
commit
40f2d1b8ff
@ -375,7 +375,7 @@ func getCRIClient() (internalapi.RuntimeService, internalapi.ImageManagerService
|
||||
|
||||
// TODO: Find a uniform way to deal with systemctl/initctl/service operations. #34494
|
||||
func findRunningKubletServiceName() string {
|
||||
stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput()
|
||||
stdout, err := exec.Command("sudo", "systemctl", "list-units", "*kubelet*", "--state=running").CombinedOutput()
|
||||
framework.ExpectNoError(err)
|
||||
regex := regexp.MustCompile("(kubelet-\\w+)")
|
||||
matches := regex.FindStringSubmatch(string(stdout))
|
||||
|
Loading…
Reference in New Issue
Block a user