diff --git a/Makefile b/Makefile index 40bd9db1f..f7842cf01 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,9 @@ generate-go-conversions-core: $(CONVERSION_GEN) .PHONY: generate-e2e-templates generate-e2e-templates: $(KUSTOMIZE) +ifneq ($(E2E_FLAVOR), vpc) $(KUSTOMIZE) build $(E2E_TEMPLATES)/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(E2E_TEMPLATES)/cluster-template-md-remediation.yaml +endif .PHONY: modules modules: ## Runs go mod to ensure modules are up to date diff --git a/scripts/ci-e2e.sh b/scripts/ci-e2e.sh index 4c65d1d83..965450e1b 100755 --- a/scripts/ci-e2e.sh +++ b/scripts/ci-e2e.sh @@ -99,6 +99,19 @@ prerequisites_powervs(){ export LOGLEVEL=5 } +prerequisites_vpc(){ + # Assigning VPC variables + export IBMVPC_REGION=${REGION} + export IBMVPC_ZONE="${REGION}-1" + export IBMVPC_RESOURCEGROUP=${IBMVPC_RESOURCEGROUP:-"fa5405a58226402f9a5818cb9b8a5a8a"} + export IBMVPC_NAME="capi-vpc-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head --bytes 5)" + export IBMVPC_IMAGE_ID=${IBMVPC_IMAGE_ID:-"r006-c6f5840c-fd6e-4b40-97ac-fbf13e1c09cd"} + export IBMVPC_PROFILE=${IBMVPC_PROFILE:-"bx2-4x16"} + export IBMVPC_SSHKEY_ID=${IBMVPC_SSHKEY_ID:-"r006-c2ae2255-9961-4654-80ea-ea9091c4decd"} + # Setting controller loglevel to allow debug logs from the VPC client + export LOGLEVEL=5 +} + main(){ # If BOSKOS_HOST is set then acquire an IBM Cloud resource from Boskos. if [ -n "${BOSKOS_HOST:-}" ]; then @@ -132,8 +145,12 @@ main(){ init_network_powervs fi + if [[ "${E2E_FLAVOR}" == "vpc" ]]; then + prerequisites_vpc + fi + # Run the e2e tests - make test-e2e + make test-e2e E2E_FLAVOR=${E2E_FLAVOR} test_status="${?}" echo TESTSTATUS="${test_status}" diff --git a/test/e2e/config/ibmcloud-e2e-vpc.yaml b/test/e2e/config/ibmcloud-e2e-vpc.yaml index e18e93872..959d7ab59 100644 --- a/test/e2e/config/ibmcloud-e2e-vpc.yaml +++ b/test/e2e/config/ibmcloud-e2e-vpc.yaml @@ -42,7 +42,7 @@ providers: targetName: "cluster-template-vpc.yaml" variables: - KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.23.5}" + KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.25.2}" # Below variable should be set based on the targeted environment SERVICE_ENDPOINT: "${SERVICE_ENDPOINT:-}" # Cluster Addons @@ -60,7 +60,7 @@ variables: intervals: default/wait-controllers: ["3m", "10s"] default/wait-cluster: ["20m", "10s"] - default/wait-control-plane: ["30m", "10s"] + default/wait-control-plane: ["60m", "10s"] default/wait-worker-nodes: ["30m", "10s"] default/wait-delete-cluster: ["20m", "10s"] default/wait-machine-upgrade: ["50m", "10s"]