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

🌱 Allow to specify cluster name for E2E quick-start #10088

Merged
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
7 changes: 7 additions & 0 deletions test/e2e/quick_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ type QuickStartSpecInput struct {
ArtifactFolder string
SkipCleanup bool

// Cluster name allows to specify a deterministic clusterName.
// If not set, a random one will be generated.
ClusterName *string

// InfrastructureProvider allows to specify the infrastructure provider to be used when looking for
// cluster templates.
// If not set, clusterctl will look at the infrastructure provider installed in the management cluster;
Expand Down Expand Up @@ -123,6 +127,9 @@ func QuickStartSpec(ctx context.Context, inputGetter func() QuickStartSpecInput)
}

clusterName := fmt.Sprintf("%s-%s", specName, util.RandomString(6))
if input.ClusterName != nil {
clusterName = *input.ClusterName
}
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
ClusterProxy: input.BootstrapClusterProxy,
ConfigCluster: clusterctl.ConfigClusterInput{
Expand Down
Loading