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

🌱 Scale test for supervisor with vcsim #3293

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions test/e2e/config/vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,7 @@ intervals:
node-drain/wait-machine-deleted: ["10m", "10s"]
node-drain/wait-statefulset-available: ["3m", "10s"]
anti-affinity/wait-vm-redistribution: ["5m", "10s"]
# Giving a bit more time during scale tests, we analyze independently if everything works quickly enough.
scale/wait-cluster: ["10m", "10s"]
scale/wait-control-plane: ["20m", "10s"]
scale/wait-worker-nodes: ["20m", "10s"]
13 changes: 9 additions & 4 deletions test/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
Expand Down Expand Up @@ -303,14 +304,16 @@ func addVCSimTestVariables(managementClusterProxy framework.ClusterProxy, specNa
}

err = managementClusterProxy.GetClient().Create(ctx, envVar)
Expect(err).ToNot(HaveOccurred(), "Failed to create EnvVar")
if !apierrors.IsAlreadyExists(err) {
Expect(err).ToNot(HaveOccurred(), "Failed to create EnvVar")
}

Eventually(func() bool {
if err := managementClusterProxy.GetClient().Get(ctx, crclient.ObjectKeyFromObject(envVar), envVar); err != nil {
return false
}
return len(envVar.Status.Variables) > 0
}, 30*time.Second, 5*time.Second).Should(BeTrue(), "Failed to get EnvVar %s", klog.KObj(envVar))
}, 300*time.Second, 5*time.Second).Should(BeTrue(), "Failed to get EnvVar %s", klog.KObj(envVar))

Byf("Setting test variables for %s", specName)
for k, v := range envVar.Status.Variables {
Expand Down Expand Up @@ -348,14 +351,16 @@ func setupNamespaceWithVMOperatorDependenciesVCSim(managementClusterProxy framew
},
}
err = c.Create(ctx, dependenciesConfig)
Expect(err).ToNot(HaveOccurred(), "Failed to create VMOperatorDependencies")
if !apierrors.IsAlreadyExists(err) {
Expect(err).ToNot(HaveOccurred(), "Failed to create VMOperatorDependencies")
}

Eventually(func() bool {
if err := c.Get(ctx, crclient.ObjectKeyFromObject(dependenciesConfig), dependenciesConfig); err != nil {
return false
}
return dependenciesConfig.Status.Ready
}, 30*time.Second, 5*time.Second).Should(BeTrue(), "Failed to get VMOperatorDependencies on namespace %s", workloadClusterNamespace)
}, 300*time.Second, 5*time.Second).Should(BeTrue(), "Failed to get VMOperatorDependencies on namespace %s", workloadClusterNamespace)
}

func setupNamespaceWithVMOperatorDependenciesVCenter(managementClusterProxy framework.ClusterProxy, workloadClusterNamespace string) {
Expand Down
Loading
Loading