Skip to content

Commit

Permalink
Merge pull request #2202 from Nordix/mquhuy/parameterize-scalability
Browse files Browse the repository at this point in the history
🌱 Parameterize scalability test
  • Loading branch information
metal3-io-bot authored Jan 7, 2025
2 parents 6cc9509 + 7f7c8df commit cf75cf8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ if [[ ${GINKGO_FOCUS:-} == "features" ]]; then
fi
# if running a scalability tests, configure dev-env with fakeIPA
if [[ ${GINKGO_FOCUS:-} == "scalability" ]]; then
export NUM_NODES="${NUM_NODES:-100}"
echo 'export NODES_PLATFORM="fake"' >>"${M3_DEV_ENV_PATH}/config_${USER}.sh"
echo 'export SKIP_APPLY_BMH="true"' >>"${M3_DEV_ENV_PATH}/config_${USER}.sh"
sed -i "s/^export NUM_NODES=.*/export NUM_NODES=${NUM_NODES:-100}/" "${M3_DEV_ENV_PATH}/config_${USER}.sh"
mkdir -p "$CAPI_CONFIG_FOLDER"
echo 'CLUSTER_TOPOLOGY: true' >"$CAPI_CONFIG_FOLDER/clusterctl.yaml"
echo 'export EPHEMERAL_CLUSTER="minikube"' >>"${M3_DEV_ENV_PATH}/config_${USER}.sh"
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/config/e2e_conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ variables:
KUBERNETES_VERSION: "v1.32.0"
CONTROL_PLANE_MACHINE_COUNT: 3
WORKER_MACHINE_COUNT: 1
NUM_NODES: 4
SCALE_SPEC_CONCURRENCY: 10
APIVersion: "infrastructure.cluster.x-k8s.io/${CAPM3_VERSION}"
IRONIC_NAMESPACE: "baremetal-operator-system"
NAMEPREFIX: "baremetal-operator"
Expand Down
11 changes: 9 additions & 2 deletions test/e2e/scalability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ type ClusterAPIServer struct {
Port int
}

var (
numberOfClusters int64
scaleSpecConcurrency int64
)

var _ = Describe("When testing scalability with fakeIPA and FKAS [scalability]", Label("scalability"), func() {
BeforeEach(func() {
osType := strings.ToLower(os.Getenv("OS"))
Expand All @@ -52,6 +57,8 @@ var _ = Describe("When testing scalability with fakeIPA and FKAS [scalability]",
namespace = "scale"
numberOfWorkers = int(*e2eConfig.GetInt32PtrVariable("WORKER_MACHINE_COUNT"))
numberOfControlplane = int(*e2eConfig.GetInt32PtrVariable("CONTROL_PLANE_MACHINE_COUNT"))
numberOfClusters = int64(*e2eConfig.GetInt32PtrVariable("NUM_NODES"))
scaleSpecConcurrency = int64(*e2eConfig.GetInt32PtrVariable("SCALE_SPEC_CONCURRENCY"))
// We need to override clusterctl apply log folder to avoid getting our credentials exposed.
clusterctlLogFolder = filepath.Join(os.TempDir(), "clusters", bootstrapClusterProxy.GetName())
createFKASResources()
Expand All @@ -70,8 +77,8 @@ var _ = Describe("When testing scalability with fakeIPA and FKAS [scalability]",
ArtifactFolder: artifactFolder,
SkipCleanup: skipCleanup,
SkipUpgrade: true,
ClusterCount: ptr.To[int64](5),
Concurrency: ptr.To[int64](5),
ClusterCount: ptr.To[int64](numberOfClusters),
Concurrency: ptr.To[int64](scaleSpecConcurrency),
Flavor: ptr.To(fmt.Sprintf("%s-fake", osType)),
ControlPlaneMachineCount: ptr.To[int64](int64(numberOfControlplane)),
MachineDeploymentCount: ptr.To[int64](0),
Expand Down

0 comments on commit cf75cf8

Please sign in to comment.