mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
use multi-arch busybox for e2e
This commit is contained in:
parent
cd25bbee46
commit
f7f3577035
@ -34,7 +34,6 @@ go_library(
|
||||
"//test/e2e/chaosmonkey:go_default_library",
|
||||
"//test/e2e/common:go_default_library",
|
||||
"//test/e2e/framework:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/batch/v1:go_default_library",
|
||||
|
@ -29,7 +29,6 @@ import (
|
||||
fedutil "k8s.io/kubernetes/federation/pkg/federation-controller/util"
|
||||
fedframework "k8s.io/kubernetes/federation/test/e2e/framework"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -279,7 +278,7 @@ func newJobForFed(namespace string, name string, completions int32, parallelism
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "sleep",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sleep", "1"},
|
||||
},
|
||||
},
|
||||
|
@ -36,7 +36,6 @@ import (
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -403,7 +402,7 @@ func discoverService(f *fedframework.Framework, name string, exists bool, podNam
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "federated-service-discovery-container",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: command,
|
||||
},
|
||||
},
|
||||
|
@ -288,7 +288,7 @@ func newCronJob(name, schedule string) *batchv1beta1.CronJob {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "c",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sleep", "300"},
|
||||
},
|
||||
},
|
||||
|
@ -243,7 +243,7 @@ func newTestingCronJob(name string, value string) *batchv1beta1.CronJob {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "c",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
MountPath: "/data",
|
||||
|
@ -35,7 +35,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/controller/job"
|
||||
"k8s.io/kubernetes/pkg/kubectl"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -304,7 +303,7 @@ func newTestCronJob(name, schedule string, concurrencyPolicy batchv1beta1.Concur
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "c",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
MountPath: "/data",
|
||||
|
@ -42,7 +42,7 @@ const (
|
||||
|
||||
var (
|
||||
mountImage = imageutils.GetE2EImage(imageutils.Mounttest)
|
||||
busyboxImage = imageutils.GetBusyBoxImage()
|
||||
busyboxImage = "busybox"
|
||||
)
|
||||
|
||||
var CurrentSuite Suite
|
||||
@ -52,7 +52,7 @@ var CurrentSuite Suite
|
||||
// only used by node e2e test.
|
||||
// TODO(random-liu): Change the image puller pod to use similar mechanism.
|
||||
var CommonImageWhiteList = sets.NewString(
|
||||
imageutils.GetBusyBoxImage(),
|
||||
"busybox",
|
||||
imageutils.GetE2EImage(imageutils.EntrypointTester),
|
||||
imageutils.GetE2EImage(imageutils.Liveness),
|
||||
imageutils.GetE2EImage(imageutils.Mounttest),
|
||||
|
@ -29,7 +29,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
func EtcdUpgrade(target_storage, target_version string) error {
|
||||
@ -327,7 +326,7 @@ func gceUpgradeScript() string {
|
||||
func waitForSSHTunnels() {
|
||||
Logf("Waiting for SSH tunnels to establish")
|
||||
RunKubectl("run", "ssh-tunnel-test",
|
||||
"--image="+imageutils.GetBusyBoxImage(),
|
||||
"--image=busybox",
|
||||
"--restart=Never",
|
||||
"--command", "--",
|
||||
"echo", "Hello")
|
||||
|
@ -192,7 +192,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
BusyBoxImage = imageutils.GetBusyBoxImage()
|
||||
BusyBoxImage = "busybox"
|
||||
// Label allocated to the image puller static pod that runs on each node
|
||||
// before e2es.
|
||||
ImagePullerLabels = map[string]string{"name": "e2e-image-puller"}
|
||||
|
@ -17,7 +17,6 @@ go_library(
|
||||
"//test/e2e/instrumentation/common:go_default_library",
|
||||
"//test/e2e/instrumentation/logging/elasticsearch:go_default_library",
|
||||
"//test/e2e/instrumentation/logging/stackdrvier:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
instrumentation "k8s.io/kubernetes/test/e2e/instrumentation/common"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disruptive]", func() {
|
||||
@ -101,7 +100,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname
|
||||
return v1.PodSpec{
|
||||
Containers: []v1.Container{{
|
||||
Name: "logging-soak",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Args: []string{
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
|
@ -95,7 +95,7 @@ var (
|
||||
kittenImage = imageutils.GetE2EImage(imageutils.Kitten)
|
||||
redisImage = imageutils.GetE2EImage(imageutils.Redis)
|
||||
nginxImage = imageutils.GetE2EImage(imageutils.NginxSlim)
|
||||
busyboxImage = imageutils.GetBusyBoxImage()
|
||||
busyboxImage = "busybox"
|
||||
)
|
||||
|
||||
var testImages = struct {
|
||||
|
@ -514,7 +514,7 @@ func createNetworkClientPod(f *framework.Framework, namespace *v1.Namespace, pod
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: fmt.Sprintf("%s-container", podName),
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Args: []string{
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
|
@ -17,7 +17,6 @@ go_library(
|
||||
"//test/e2e/common:go_default_library",
|
||||
"//test/e2e/framework:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
"//vendor/github.com/onsi/ginkgo:go_default_library",
|
||||
"//vendor/github.com/onsi/gomega:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
|
@ -34,7 +34,6 @@ import (
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -170,7 +169,7 @@ func createPodUsingNfs(f *framework.Framework, c clientset.Interface, ns, nfsIP,
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "pod-nfs-vol",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"/bin/sh"},
|
||||
Args: cmdLine,
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
|
@ -32,7 +32,6 @@ import (
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
func scTestPod(hostIPC bool, hostPID bool) *v1.Pod {
|
||||
@ -50,7 +49,7 @@ func scTestPod(hostIPC bool, hostPID bool) *v1.Pod {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "test-container",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
},
|
||||
},
|
||||
RestartPolicy: v1.RestartPolicyNever,
|
||||
|
@ -27,7 +27,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
// This test requires that --terminated-pod-gc-threshold=100 be set on the controller manager
|
||||
@ -90,7 +89,7 @@ func createTerminatingPod(f *framework.Framework) (*v1.Pod, error) {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: string(uuid),
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
},
|
||||
},
|
||||
SchedulerName: "please don't schedule my pods",
|
||||
|
@ -80,7 +80,7 @@ func testPreStop(c clientset.Interface, ns string) {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "tester",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sleep", "600"},
|
||||
Lifecycle: &v1.Lifecycle{
|
||||
PreStop: &v1.Handler{
|
||||
|
@ -351,7 +351,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "test-container",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sleep", "10000"},
|
||||
Resources: v1.ResourceRequirements{
|
||||
Requests: v1.ResourceList{
|
||||
|
@ -38,7 +38,6 @@ import (
|
||||
v1core "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||
"k8s.io/kubernetes/pkg/api/testapi"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -486,7 +485,7 @@ func testPDPod(diskNames []string, targetNode types.NodeName, readOnly bool, num
|
||||
if numContainers > 1 {
|
||||
containers[i].Name = fmt.Sprintf("mycontainer%v", i+1)
|
||||
}
|
||||
containers[i].Image = imageutils.GetBusyBoxImage()
|
||||
containers[i].Image = "busybox"
|
||||
containers[i].Command = []string{"sleep", "6000"}
|
||||
containers[i].VolumeMounts = make([]v1.VolumeMount, len(diskNames))
|
||||
for k := range diskNames {
|
||||
|
@ -45,7 +45,6 @@ import (
|
||||
storageutil "k8s.io/kubernetes/pkg/apis/storage/v1/util"
|
||||
kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
type storageClassTest struct {
|
||||
@ -796,7 +795,7 @@ func runInPodWithVolume(c clientset.Interface, ns, claimName, command string) {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "volume-tester",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"/bin/sh"},
|
||||
Args: []string{"-c", command},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
|
@ -36,7 +36,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/cloudprovider/providers/vsphere/vclib"
|
||||
"k8s.io/kubernetes/pkg/volume/util/volumehelper"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
// Sanity check for vSphere testing. Verify the persistent disk attached to the node.
|
||||
@ -245,7 +244,7 @@ func getVSpherePodSpecWithClaim(claimName string, nodeSelectorKV map[string]stri
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "volume-tester",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"/bin/sh"},
|
||||
Args: []string{"-c", command},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
@ -310,7 +309,7 @@ func getVSpherePodSpecWithVolumePaths(volumePaths []string, keyValuelabel map[st
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "vsphere-e2e-container-" + string(uuid.NewUUID()),
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: commands,
|
||||
VolumeMounts: volumeMounts,
|
||||
},
|
||||
|
@ -118,7 +118,7 @@ func (t *ConfigMapUpgradeTest) testPod(f *framework.Framework) {
|
||||
},
|
||||
{
|
||||
Name: "configmap-env-test",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sh", "-c", "env"},
|
||||
Env: []v1.EnvVar{
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ func (t *SecretUpgradeTest) testPod(f *framework.Framework) {
|
||||
},
|
||||
{
|
||||
Name: "secret-env-test",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"sh", "-c", "env"},
|
||||
Env: []v1.EnvVar{
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/kubelet/sysctl"
|
||||
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
// SecretUpgradeTest tests that a pod with sysctls runs before and after an upgrade. During
|
||||
@ -132,7 +131,7 @@ func sysctlTestPod(name string, sysctls map[string]string) *v1.Pod {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "test-container",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: append([]string{"/bin/sysctl"}, keys...),
|
||||
},
|
||||
},
|
||||
|
@ -24,7 +24,6 @@ import (
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -55,12 +54,12 @@ var _ = framework.KubeDescribe("Docker features [Feature:Docker]", func() {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: "test-container-1",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"/bin/top"},
|
||||
},
|
||||
{
|
||||
Name: "test-container-2",
|
||||
Image: imageutils.GetBusyBoxImage(),
|
||||
Image: "busybox",
|
||||
Command: []string{"/bin/sleep"},
|
||||
Args: []string{"10000"},
|
||||
},
|
||||
|
@ -341,7 +341,7 @@ var _ = framework.KubeDescribe("Security Context", func() {
|
||||
createAndWaitUserPod := func(readOnlyRootFilesystem bool) string {
|
||||
podName := fmt.Sprintf("busybox-readonly-%v-%s", readOnlyRootFilesystem, uuid.NewUUID())
|
||||
podClient.Create(makeUserPod(podName,
|
||||
imageutils.GetBusyBoxImage(),
|
||||
"busybox",
|
||||
[]string{"sh", "-c", "touch checkfile"},
|
||||
readOnlyRootFilesystem,
|
||||
))
|
||||
|
@ -45,7 +45,6 @@ import (
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||
)
|
||||
|
||||
// TODO(random-liu): Get this automatically from kubelet flag.
|
||||
@ -53,7 +52,7 @@ var kubeletAddress = flag.String("kubelet-address", "http://127.0.0.1:10255", "H
|
||||
|
||||
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 busyboxImage = imageutils.GetBusyBoxImage()
|
||||
var busyboxImage = "busybox"
|
||||
|
||||
func getNodeSummary() (*stats.Summary, error) {
|
||||
req, err := http.NewRequest("GET", *kubeletAddress+"/stats/summary", nil)
|
||||
|
@ -86,21 +86,3 @@ var (
|
||||
func GetE2EImage(image ImageConfig) string {
|
||||
return fmt.Sprintf("%s/%s-%s:%s", image.registry, image.name, runtime.GOARCH, image.version)
|
||||
}
|
||||
|
||||
// GetBusyboxImage returns multi-arch busybox docker image
|
||||
func GetBusyBoxImage() string {
|
||||
switch arch := runtime.GOARCH; arch {
|
||||
case "amd64":
|
||||
return "busybox"
|
||||
case "arm":
|
||||
return "arm32v6/busybox"
|
||||
case "arm64":
|
||||
return "arm64v8/busybox"
|
||||
case "ppc64le":
|
||||
return "ppc64le/busybox"
|
||||
case "s390x":
|
||||
return "s390x/busybox"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user