Skip to content
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
1 change: 1 addition & 0 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ main(){
export EXP_CLUSTER_RESOURCE_SET=true
export IBMACCOUNT_ID=${IBMACCOUNT_ID:-"7cfbd5381a434af7a09289e795840d4e"}
export BASE64_API_KEY=$(tr -d '\n' <<<"$IBMCLOUD_API_KEY" | base64)
export CUSTOM_KIND_NODE_IMAGE=${CUSTOM_KIND_NODE_IMAGE:-}
# Setting controller loglevel to allow debug logs from the VPC/PowerVS client
export LOGLEVEL=5

Expand Down
1 change: 1 addition & 0 deletions test/e2e/config/ibmcloud-e2e-powervs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ variables:
KUBERNETES_VERSION: "${KUBERNETES_VERSION:-v1.33.1}"
# Below variable should be set based on the targeted environment
SERVICE_ENDPOINT: "${SERVICE_ENDPOINT:-}"
CUSTOM_KIND_NODE_IMAGE: ${CUSTOM_KIND_NODE_IMAGE:-}""
# Cluster Addons
CNI: "${PWD}/test/e2e/data/cni/calico/calico.yaml"
IP_FAMILY: "IPv4"
Expand Down
28 changes: 19 additions & 9 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ import (
)

const (
KubernetesVersion = "KUBERNETES_VERSION"
CNIPath = "CNI"
CNIResources = "CNI_RESOURCES"
KubernetesVersion = "KUBERNETES_VERSION"
CNIPath = "CNI"
CNIResources = "CNI_RESOURCES"
CustomKindNodeImage = "CUSTOM_KIND_NODE_IMAGE"
)

// Test suite flags.
Expand Down Expand Up @@ -192,13 +193,22 @@ func createClusterctlLocalRepository(config *clusterctl.E2EConfig, repositoryFol
}

func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme, useExistingCluster bool) (bootstrap.ClusterProvider, framework.ClusterProxy) {
var clusterProvider bootstrap.ClusterProvider
kubeconfigPath := ""
var (
clusterProvider bootstrap.ClusterProvider
kubeconfigPath string
)
input := bootstrap.CreateKindBootstrapClusterAndLoadImagesInput{
Name: config.ManagementClusterName,
Images: config.Images,
}

customImage := config.GetVariableOrEmpty(CustomKindNodeImage)
if customImage != "" {
input.CustomNodeImage = customImage
}

if !useExistingCluster {
clusterProvider = bootstrap.CreateKindBootstrapClusterAndLoadImages(context.TODO(), bootstrap.CreateKindBootstrapClusterAndLoadImagesInput{
Name: config.ManagementClusterName,
Images: config.Images,
})
clusterProvider = bootstrap.CreateKindBootstrapClusterAndLoadImages(context.TODO(), input)
Expect(clusterProvider).ToNot(BeNil(), "Failed to create a bootstrap cluster")

kubeconfigPath = clusterProvider.GetKubeconfigPath()
Expand Down