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

[release-1.2] 🌱 Add ControlPlaneWaiters to input for e2e specs #6978

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
2 changes: 2 additions & 0 deletions test/e2e/cluster_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type ClusterUpgradeConformanceSpecInput struct {
ArtifactFolder string
SkipCleanup bool
SkipConformanceTests bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// ControlPlaneMachineCount is used in `config cluster` to configure the count of the control plane machines used in the test.
// Default is 1.
Expand Down Expand Up @@ -131,6 +132,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
ControlPlaneMachineCount: pointer.Int64Ptr(controlPlaneMachineCount),
WorkerMachineCount: pointer.Int64Ptr(workerMachineCount),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/clusterclass_changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type ClusterClassChangesSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// Flavor is the cluster-template flavor used to create the Cluster for testing.
// NOTE: The template must be using a ClusterClass.
Expand Down Expand Up @@ -130,6 +131,7 @@ func ClusterClassChangesSpec(ctx context.Context, inputGetter func() ClusterClas
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/clusterctl_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type ClusterctlUpgradeSpecInput struct {
// provider contract to use to initialise the secondary management cluster, e.g. `v1alpha3`
InitWithProvidersContract string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
PreInit func(managementClusterProxy framework.ClusterProxy)
PreUpgrade func(managementClusterProxy framework.ClusterProxy)
PostUpgrade func(managementClusterProxy framework.ClusterProxy)
Expand Down Expand Up @@ -163,6 +164,7 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/k8s_conformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type K8SConformanceSpecInput struct {
ArtifactFolder string
SkipCleanup bool
Flavor string
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
}

// K8SConformanceSpec implements a spec that creates a cluster and runs Kubernetes conformance suite.
Expand Down Expand Up @@ -96,6 +97,7 @@ func K8SConformanceSpec(ctx context.Context, inputGetter func() K8SConformanceSp
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(workerMachineCount),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/machine_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type MachinePoolInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// Flavor, if specified must refer to a template that contains a MachinePool resource.
// If not specified, "machine-pool" is used
Expand Down Expand Up @@ -90,6 +91,7 @@ func MachinePoolSpec(ctx context.Context, inputGetter func() MachinePoolInput) {
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(int64(workerMachineCount)),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachinePools: input.E2EConfig.GetIntervals(specName, "wait-machine-pool-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/md_rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type MachineDeploymentRolloutSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
Flavor string
}

Expand Down Expand Up @@ -83,6 +84,7 @@ func MachineDeploymentRolloutSpec(ctx context.Context, inputGetter func() Machin
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/md_scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type MachineDeploymentScaleSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
Flavor string
}

Expand Down Expand Up @@ -84,6 +85,7 @@ func MachineDeploymentScaleSpec(ctx context.Context, inputGetter func() MachineD
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/mhc_remediations.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type MachineRemediationSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// KCPFlavor, if specified, must refer to a template that has a MachineHealthCheck
// resource configured to match the control plane Machines (cluster.x-k8s.io/controlplane: "" label)
Expand Down Expand Up @@ -96,6 +97,7 @@ func MachineRemediationSpec(ctx context.Context, inputGetter func() MachineRemed
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down Expand Up @@ -128,6 +130,7 @@ func MachineRemediationSpec(ctx context.Context, inputGetter func() MachineRemed
ControlPlaneMachineCount: pointer.Int64Ptr(3),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/node_drain_timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type NodeDrainTimeoutSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// Flavor, if specified, must refer to a template that contains
// a KubeadmControlPlane resource with spec.machineTemplate.nodeDrainTimeout
Expand Down Expand Up @@ -96,6 +97,7 @@ func NodeDrainTimeoutSpec(ctx context.Context, inputGetter func() NodeDrainTimeo
ControlPlaneMachineCount: pointer.Int64Ptr(int64(controlPlaneReplicas)),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/quick_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type QuickStartSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters

// Flavor, if specified is the template flavor used to create the cluster for testing.
// If not specified, and the e2econfig variable IPFamily is IPV6, then "ipv6" is used,
Expand Down Expand Up @@ -96,6 +97,7 @@ func QuickStartSpec(ctx context.Context, inputGetter func() QuickStartSpecInput)
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/self_hosted.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type SelfHostedSpecInput struct {
BootstrapClusterProxy framework.ClusterProxy
ArtifactFolder string
SkipCleanup bool
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
Flavor string
}

Expand Down Expand Up @@ -94,6 +95,7 @@ func SelfHostedSpec(ctx context.Context, inputGetter func() SelfHostedSpecInput)
ControlPlaneMachineCount: pointer.Int64Ptr(1),
WorkerMachineCount: pointer.Int64Ptr(1),
},
ControlPlaneWaiters: input.ControlPlaneWaiters,
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
Expand Down