Merge pull request #127630 from dshebib/e2eNode_UpdateToAgnhost

[e2e_node] containers_lifecycle update from busybox to agnhost
This commit is contained in:
Kubernetes Prow Robot
2025-07-18 15:24:25 -07:00
committed by GitHub
4 changed files with 198 additions and 185 deletions

View File

@@ -62,6 +62,9 @@ func GetDefaultTestImage() string {
// due to the issue of #https://github.com/kubernetes-sigs/windows-testing/pull/35.
// If the node OS is linux, return busybox image
func GetDefaultTestImageID() imageutils.ImageID {
if framework.NodeOSDistroIs("windows") {
return GetTestImageID(imageutils.Agnhost)
}
return GetTestImageID(imageutils.BusyBox)
}

View File

@@ -94,7 +94,7 @@ func ExecCommand(name string, c execCommand) []string {
}
fmt.Fprintf(&cmd, "echo %s '%s Exiting' | tee -a %s >> /proc/1/fd/1; ", timeCmd, name, containerLog)
fmt.Fprintf(&cmd, "exit %d", c.ExitCode)
return []string{"sh", "-c", cmd.String()}
return e2epod.GenerateScriptCmd(cmd.String())
}
// sleepCommand returns a command that sleeps for the given number of seconds

File diff suppressed because it is too large Load Diff

View File

@@ -73,6 +73,7 @@ import (
var startServices = flag.Bool("start-services", true, "If true, start local node services")
var stopServices = flag.Bool("stop-services", true, "If true, stop local node services after running tests")
var defaultImage = e2epod.GetDefaultTestImage()
var busyboxImage = imageutils.GetE2EImage(imageutils.BusyBox)
var agnhostImage = imageutils.GetE2EImage(imageutils.Agnhost)