Skip to content

Commit

Permalink
Removed local declarations of busy box image (#2402) (#2426)
Browse files Browse the repository at this point in the history
  • Loading branch information
kavyashree-r authored Jun 8, 2023
1 parent 67914a0 commit ccb8ae9
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/e2e/docs/guest_cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ The section outlines how to set the env variable for running e2e test.
export SHARED_NFS_DATASTORE_URL="<shared-NFS-datastore-url>"
#shared VMFS datastore url
export SHARED_VMFS_DATASTORE_URL="<shared-VMFS-datastore-url>"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"

# `STORAGE_POLICY_FOR_SHARED_DATASTORES` and `STORAGE_POLICY_FOR_NONSHARED_DATASTORES` need to be
# added to `SVC_NAMESPACE` with storage limit >=20GiB each
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docs/multimaster_cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ SSH keys need to be configured properley for all three master nodes of K8S clust
export STORAGE_POLICY_FOR_SHARED_DATASTORES="vSAN Default Storage Policy"
export USER=root
export GINKGO_FOCUS="csi-multi-master-block-e2e"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"

## Requirements

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docs/supervisor_cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ datacenters should be comma separated if deployed on multi-datacenters
export SHARED_NFS_DATASTORE_URL="<shared-NFS-datastore-url>"
#shared VMFS datastore url
export SHARED_VMFS_DATASTORE_URL="<shared-VMFS-datastore-url>"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"

### To run full sync test, need do extra following steps

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docs/topology_aware_vanilla_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ datacenters should be comma separated if deployed on multi-datacenters
export STORAGE_POLICY_FROM_INACCESSIBLE_ZONE="Region-2-shared-datastore-storage-policy"
# Datastore URL from the region/zone where worker node VMs do not have a shared datastore
export INACCESSIBLE_ZONE_VSPHERE_DATASTORE_URL="Region-2-shared-datastore-storage-url"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"

## Requirements

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docs/vanilla_cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ list of datastore URLs where you want to deploy file share volumes. Retrieve thi
export USER=root
export CLUSTER_FLAVOR="VANILLA"
export CSI_NAMESPACE="vmware-system-csi"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"
# To run e2e test for block volume, need to set the following env variable
export GINKGO_FOCUS="csi-block-vanilla"
# To run e2e test for file volume, need to set the following env variable
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/docs/vmc_tkg_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The section outlines how to set the env variable for running the e2e test.
export SHARED_VMFS_DATASTORE_URL="<shared-VMFS-datastore-url>"
#management datastore url
export MANAGEMENT_DATASTORE_URL="<mgmt-datastore-url>"
export BUSYBOX_IMAGE="<image-used-to-deploy-pods>"

# `STORAGE_POLICY_FOR_SHARED_DATASTORES` need to be
# added to `SVC_NAMESPACE` with storage limit >=20GiB each
Expand Down
9 changes: 7 additions & 2 deletions tests/e2e/e2e_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
const (
adminPassword = "Admin!23"
attacherContainerName = "csi-attacher"
busyBoxImageOnGcr = "gcr.io/google_containers/busybox:1.27"
nginxImage = "k8s.gcr.io/nginx-slim:0.8"
nginxImage = "registry.k8s.io/nginx-slim:0.26"
nginxImage4upg = "registry.k8s.io/nginx-slim:0.27"
configSecret = "vsphere-config-secret"
contollerClusterKubeConfig = "CONTROLLER_CLUSTER_KUBECONFIG"
crdCNSNodeVMAttachment = "cnsnodevmattachments"
Expand Down Expand Up @@ -218,6 +218,11 @@ var (
rwxAccessMode bool
)

// For busybox pod image
var (
busyBoxImageOnGcr = "busybox"
)

// For VCP to CSI migration tests.
var (
envSharedDatastoreName = "SHARED_VSPHERE_DATASTORE_NAME"
Expand Down
6 changes: 6 additions & 0 deletions tests/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
)

const kubeconfigEnvVar = "KUBECONFIG"
const busyBoxImageEnvVar = "BUSYBOX_IMAGE"

func init() {
// k8s.io/kubernetes/tests/e2e/framework requires env KUBECONFIG to be set
Expand All @@ -37,9 +38,14 @@ func init() {
kubeconfig := filepath.Join(os.Getenv("HOME"), ".kube", "config")
os.Setenv(kubeconfigEnvVar, kubeconfig)
}

framework.AfterReadingAllFlags(&framework.TestContext)
clusterFlavor := cnstypes.CnsClusterFlavor(os.Getenv(envClusterFlavor))
setClusterFlavor(clusterFlavor)

if os.Getenv(busyBoxImageEnvVar) != "" {
busyBoxImageOnGcr = os.Getenv(busyBoxImageEnvVar)
}
}

func TestE2E(t *testing.T) {
Expand Down

0 comments on commit ccb8ae9

Please sign in to comment.