Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support e2e vpc test flow #901

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/config/ibmcloud-e2e-vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down