Skip to content

Commit 6182097

Browse files
support e2e vpc test flow (#901)
Signed-off-by: Prajyot-Parab <[email protected]> Signed-off-by: Prajyot-Parab <[email protected]>
1 parent 212aaa4 commit 6182097

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ generate-go-conversions-core: $(CONVERSION_GEN)
159159

160160
.PHONY: generate-e2e-templates
161161
generate-e2e-templates: $(KUSTOMIZE)
162+
ifneq ($(E2E_FLAVOR), vpc)
162163
$(KUSTOMIZE) build $(E2E_TEMPLATES)/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(E2E_TEMPLATES)/cluster-template-md-remediation.yaml
164+
endif
163165

164166
.PHONY: modules
165167
modules: ## Runs go mod to ensure modules are up to date

scripts/ci-e2e.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ prerequisites_powervs(){
9999
export LOGLEVEL=5
100100
}
101101

102+
prerequisites_vpc(){
103+
# Assigning VPC variables
104+
export IBMVPC_REGION=${REGION}
105+
export IBMVPC_ZONE="${REGION}-1"
106+
export IBMVPC_RESOURCEGROUP=${IBMVPC_RESOURCEGROUP:-"fa5405a58226402f9a5818cb9b8a5a8a"}
107+
export IBMVPC_NAME="capi-vpc-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head --bytes 5)"
108+
export IBMVPC_IMAGE_ID=${IBMVPC_IMAGE_ID:-"r006-c6f5840c-fd6e-4b40-97ac-fbf13e1c09cd"}
109+
export IBMVPC_PROFILE=${IBMVPC_PROFILE:-"bx2-4x16"}
110+
export IBMVPC_SSHKEY_ID=${IBMVPC_SSHKEY_ID:-"r006-c2ae2255-9961-4654-80ea-ea9091c4decd"}
111+
# Setting controller loglevel to allow debug logs from the VPC client
112+
export LOGLEVEL=5
113+
}
114+
102115
main(){
103116
# If BOSKOS_HOST is set then acquire an IBM Cloud resource from Boskos.
104117
if [ -n "${BOSKOS_HOST:-}" ]; then
@@ -132,8 +145,12 @@ main(){
132145
init_network_powervs
133146
fi
134147

148+
if [[ "${E2E_FLAVOR}" == "vpc" ]]; then
149+
prerequisites_vpc
150+
fi
151+
135152
# Run the e2e tests
136-
make test-e2e
153+
make test-e2e E2E_FLAVOR=${E2E_FLAVOR}
137154
test_status="${?}"
138155
echo TESTSTATUS="${test_status}"
139156

test/e2e/config/ibmcloud-e2e-vpc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ providers:
4242
targetName: "cluster-template-vpc.yaml"
4343

4444
variables:
45-
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.23.5}"
45+
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.25.2}"
4646
# Below variable should be set based on the targeted environment
4747
SERVICE_ENDPOINT: "${SERVICE_ENDPOINT:-}"
4848
# Cluster Addons
@@ -60,7 +60,7 @@ variables:
6060
intervals:
6161
default/wait-controllers: ["3m", "10s"]
6262
default/wait-cluster: ["20m", "10s"]
63-
default/wait-control-plane: ["30m", "10s"]
63+
default/wait-control-plane: ["60m", "10s"]
6464
default/wait-worker-nodes: ["30m", "10s"]
6565
default/wait-delete-cluster: ["20m", "10s"]
6666
default/wait-machine-upgrade: ["50m", "10s"]

0 commit comments

Comments
 (0)