diff --git a/hack/build-manifests.sh b/hack/build-manifests.sh index dc514ed8c9d1..b2776d9de6fb 100755 --- a/hack/build-manifests.sh +++ b/hack/build-manifests.sh @@ -87,6 +87,7 @@ for arg in $args; do --image-prefix=${image_prefix} \ --image-pull-policy=${image_pull_policy} \ --infra-replicas=${infra_replicas} \ + --test-image-replicas=${test_image_replicas} \ --input-file=${infile} \ --kubevirt-logo-path=${kubevirt_logo_path} \ --namespace=${namespace} \ diff --git a/hack/config-default.sh b/hack/config-default.sh index 49b3af185f5f..549195ec7379 100644 --- a/hack/config-default.sh +++ b/hack/config-default.sh @@ -43,6 +43,7 @@ conn_check_ipv6_address=${CONN_CHECK_IPV6_ADDRESS:-""} conn_check_dns=${CONN_CHECK_DNS:-""} migration_network_nic=${MIGRATION_NETWORK_NIC:-"eth1"} infra_replicas=${KUBEVIRT_INFRA_REPLICAS:-0} +test_image_replicas=${KUBEVIRT_E2E_PARALLEL_NODES:-6} common_instancetypes_version=${COMMON_INSTANCETYPES_VERSION:-"v1.0.1"} cluster_instancetypes_sha256=${CLUSTER_INSTANCETYPES_SHA256:-"ebd37dae0ed07ae1a79bb09b27b4fe8b971ff371ee900119e1906e1574ecf829"} cluster_preferences_sha256=${CLUSTER_PREFERENCES_SHA256:-"fa7e6cb6b21116d4ef200f4e9e774e38f26862055f62a23c7f926610f0d25ba4"} diff --git a/hack/manifests.sh b/hack/manifests.sh index b1ce7ac2cf2f..6b7f923066c4 100755 --- a/hack/manifests.sh +++ b/hack/manifests.sh @@ -26,7 +26,7 @@ echo "Building manifests..." ${KUBEVIRT_PATH}hack/dockerized "KUBEVIRT_NO_BAZEL=${KUBEVIRT_NO_BAZEL} BUILD_ARCH=${BUILD_ARCH} && CSV_VERSION=${CSV_VERSION} QUAY_REPOSITORY=${QUAY_REPOSITORY} \ DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER} KUBEVIRT_ONLY_USE_TAGS=${KUBEVIRT_ONLY_USE_TAGS} \ - IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} PACKAGE_NAME=${PACKAGE_NAME} KUBEVIRT_INFRA_REPLICAS=${KUBEVIRT_INFRA_REPLICAS} \ + IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} PACKAGE_NAME=${PACKAGE_NAME} KUBEVIRT_INFRA_REPLICAS=${KUBEVIRT_INFRA_REPLICAS} KUBEVIRT_E2E_PARALLEL_NODES=${KUBEVIRT_E2E_PARALLEL_NODES} \ KUBEVIRT_INSTALLED_NAMESPACE=${KUBEVIRT_INSTALLED_NAMESPACE} feature_gates=${FEATURE_GATES} runbook_url_template=${RUNBOOK_URL_TEMPLATE} ./hack/build-manifests.sh" echo "Done $0" diff --git a/images/disks-images-provider/entrypoint.sh b/images/disks-images-provider/entrypoint.sh index 6939f68fd3b8..cd69664fd79a 100755 --- a/images/disks-images-provider/entrypoint.sh +++ b/images/disks-images-provider/entrypoint.sh @@ -28,24 +28,18 @@ mkdir -p /images/datavolume1 /images/datavolume2 /images/datavolume3 echo "copy all images to host mount directory" cp -R /images/* /hostImages/ echo "make the alpine image ready for parallel use" -cp -r /hostImages/alpine hostImages/alpine1 -cp -r /hostImages/alpine hostImages/alpine2 -cp -r /hostImages/alpine hostImages/alpine3 -cp -r /hostImages/alpine hostImages/alpine4 -cp -r /hostImages/alpine hostImages/alpine5 -cp -r /hostImages/alpine hostImages/alpine6 +for ((n = 1; n <= $(($NUM_TEST_IMAGE_REPLICAS)); n++)); do + cp -r /hostImages/alpine hostImages/alpine${n} +done rm -rf /hostImages/alpine mkdir -p /local-storage/hotplug-test cp -r /hostImages/custom/disk.img /local-storage/hotplug-test/disk.img chmod -R 777 /local-storage/hotplug-test echo "make the custom image ready for parallel use" -cp -r /hostImages/custom hostImages/custom1 -cp -r /hostImages/custom hostImages/custom2 -cp -r /hostImages/custom hostImages/custom3 -cp -r /hostImages/custom hostImages/custom4 -cp -r /hostImages/custom hostImages/custom5 -cp -r /hostImages/custom hostImages/custom6 +for ((n = 1; n <= $(($NUM_TEST_IMAGE_REPLICAS)); n++)); do + cp -r /hostImages/custom hostImages/custom${n} +done rm -rf /hostImages/custom chmod -R 777 /hostImages diff --git a/manifests/testing/disks-images-provider.yaml.in b/manifests/testing/disks-images-provider.yaml.in index 0b4e36060c3d..d746f54b31cc 100644 --- a/manifests/testing/disks-images-provider.yaml.in +++ b/manifests/testing/disks-images-provider.yaml.in @@ -24,6 +24,9 @@ spec: - name: target image: {{.DockerPrefix}}/disks-images-provider:{{.DockerTag}} imagePullPolicy: Always + env: + - name: NUM_TEST_IMAGE_REPLICAS + value: {{.TestImageReplicas}} lifecycle: preStop: exec: diff --git a/tools/manifest-templator/manifest-templator.go b/tools/manifest-templator/manifest-templator.go index 669c0b31cf51..ad2cedb6420d 100644 --- a/tools/manifest-templator/manifest-templator.go +++ b/tools/manifest-templator/manifest-templator.go @@ -77,6 +77,7 @@ type templateData struct { PriorityClassSpec string FeatureGates []string InfraReplicas uint8 + TestImageReplicas string GeneratedManifests map[string]string VirtOperatorImage string VirtApiImage string @@ -120,6 +121,7 @@ func main() { runbookURLTemplate := flag.String("runbook-url-template", "", "") featureGates := flag.String("feature-gates", "", "") infraReplicas := flag.Uint("infra-replicas", 0, "") + testImageReplicas := flag.String("test-image-replicas", "0", "") virtOperatorImage := flag.String("virt-operator-image", "", "custom image for virt-operator") virtApiImage := flag.String("virt-api-image", "", "custom image for virt-api. "+customImageExample) virtControllerImage := flag.String("virt-controller-image", "", "custom image for virt-controller. "+customImageExample) @@ -158,6 +160,7 @@ func main() { data.ImagePrefix = *imagePrefix data.ImagePullPolicy = *imagePullPolicy data.Verbosity = fmt.Sprintf("\"%s\"", *verbosity) + data.TestImageReplicas = fmt.Sprintf("\"%s\"", *testImageReplicas) data.CsvVersion = *csvVersion data.QuayRepository = *quayRepository data.VirtOperatorSha = *virtOperatorSha @@ -204,6 +207,7 @@ func main() { data.ImagePrefix = "{{.ImagePrefix}}" data.ImagePullPolicy = "{{.ImagePullPolicy}}" data.Verbosity = "{{.Verbosity}}" + data.TestImageReplicas = "{{.TestImageReplicas}}" data.CsvVersion = "{{.CsvVersion}}" data.QuayRepository = "{{.QuayRepository}}" data.VirtOperatorSha = "{{.VirtOperatorSha}}"