Skip to content

Commit bc177c6

Browse files
authored
Merge pull request #6964 from CecileRobertMichon/controlplanewaiters-e2e
🌱 Add ControlPlaneWaiters to input for e2e specs
2 parents f7558d0 + 7e8eec1 commit bc177c6

11 files changed

+23
-0
lines changed

test/e2e/cluster_upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type ClusterUpgradeConformanceSpecInput struct {
4141
ArtifactFolder string
4242
SkipCleanup bool
4343
SkipConformanceTests bool
44+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4445

4546
// ControlPlaneMachineCount is used in `config cluster` to configure the count of the control plane machines used in the test.
4647
// Default is 1.
@@ -131,6 +132,7 @@ func ClusterUpgradeConformanceSpec(ctx context.Context, inputGetter func() Clust
131132
ControlPlaneMachineCount: pointer.Int64Ptr(controlPlaneMachineCount),
132133
WorkerMachineCount: pointer.Int64Ptr(workerMachineCount),
133134
},
135+
ControlPlaneWaiters: input.ControlPlaneWaiters,
134136
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
135137
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
136138
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/clusterclass_changes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type ClusterClassChangesSpecInput struct {
4747
BootstrapClusterProxy framework.ClusterProxy
4848
ArtifactFolder string
4949
SkipCleanup bool
50+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
5051

5152
// Flavor is the cluster-template flavor used to create the Cluster for testing.
5253
// NOTE: The template must be using a ClusterClass.
@@ -130,6 +131,7 @@ func ClusterClassChangesSpec(ctx context.Context, inputGetter func() ClusterClas
130131
ControlPlaneMachineCount: pointer.Int64Ptr(1),
131132
WorkerMachineCount: pointer.Int64Ptr(1),
132133
},
134+
ControlPlaneWaiters: input.ControlPlaneWaiters,
133135
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
134136
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
135137
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/clusterctl_upgrade.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type ClusterctlUpgradeSpecInput struct {
6565
// provider contract to use to initialise the secondary management cluster, e.g. `v1alpha3`
6666
InitWithProvidersContract string
6767
SkipCleanup bool
68+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
6869
PreInit func(managementClusterProxy framework.ClusterProxy)
6970
PreUpgrade func(managementClusterProxy framework.ClusterProxy)
7071
PostUpgrade func(managementClusterProxy framework.ClusterProxy)
@@ -163,6 +164,7 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
163164
ControlPlaneMachineCount: pointer.Int64Ptr(1),
164165
WorkerMachineCount: pointer.Int64Ptr(1),
165166
},
167+
ControlPlaneWaiters: input.ControlPlaneWaiters,
166168
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
167169
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
168170
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/k8s_conformance.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type K8SConformanceSpecInput struct {
4141
ArtifactFolder string
4242
SkipCleanup bool
4343
Flavor string
44+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4445
}
4546

4647
// K8SConformanceSpec implements a spec that creates a cluster and runs Kubernetes conformance suite.
@@ -96,6 +97,7 @@ func K8SConformanceSpec(ctx context.Context, inputGetter func() K8SConformanceSp
9697
ControlPlaneMachineCount: pointer.Int64Ptr(1),
9798
WorkerMachineCount: pointer.Int64Ptr(workerMachineCount),
9899
},
100+
ControlPlaneWaiters: input.ControlPlaneWaiters,
99101
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
100102
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
101103
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/machine_pool.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type MachinePoolInput struct {
4242
BootstrapClusterProxy framework.ClusterProxy
4343
ArtifactFolder string
4444
SkipCleanup bool
45+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4546

4647
// Flavor, if specified must refer to a template that contains a MachinePool resource.
4748
// If not specified, "machine-pool" is used
@@ -90,6 +91,7 @@ func MachinePoolSpec(ctx context.Context, inputGetter func() MachinePoolInput) {
9091
ControlPlaneMachineCount: pointer.Int64Ptr(1),
9192
WorkerMachineCount: pointer.Int64Ptr(int64(workerMachineCount)),
9293
},
94+
ControlPlaneWaiters: input.ControlPlaneWaiters,
9395
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
9496
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
9597
WaitForMachinePools: input.E2EConfig.GetIntervals(specName, "wait-machine-pool-nodes"),

test/e2e/md_rollout.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type MachineDeploymentRolloutSpecInput struct {
3939
BootstrapClusterProxy framework.ClusterProxy
4040
ArtifactFolder string
4141
SkipCleanup bool
42+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4243
Flavor string
4344
}
4445

@@ -83,6 +84,7 @@ func MachineDeploymentRolloutSpec(ctx context.Context, inputGetter func() Machin
8384
ControlPlaneMachineCount: pointer.Int64Ptr(1),
8485
WorkerMachineCount: pointer.Int64Ptr(1),
8586
},
87+
ControlPlaneWaiters: input.ControlPlaneWaiters,
8688
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
8789
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
8890
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/md_scale.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type MachineDeploymentScaleSpecInput struct {
3939
BootstrapClusterProxy framework.ClusterProxy
4040
ArtifactFolder string
4141
SkipCleanup bool
42+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4243
Flavor string
4344
}
4445

@@ -84,6 +85,7 @@ func MachineDeploymentScaleSpec(ctx context.Context, inputGetter func() MachineD
8485
ControlPlaneMachineCount: pointer.Int64Ptr(1),
8586
WorkerMachineCount: pointer.Int64Ptr(1),
8687
},
88+
ControlPlaneWaiters: input.ControlPlaneWaiters,
8789
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
8890
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
8991
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/mhc_remediations.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type MachineRemediationSpecInput struct {
3939
BootstrapClusterProxy framework.ClusterProxy
4040
ArtifactFolder string
4141
SkipCleanup bool
42+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4243

4344
// KCPFlavor, if specified, must refer to a template that has a MachineHealthCheck
4445
// resource configured to match the control plane Machines (cluster.x-k8s.io/controlplane: "" label)
@@ -96,6 +97,7 @@ func MachineRemediationSpec(ctx context.Context, inputGetter func() MachineRemed
9697
ControlPlaneMachineCount: pointer.Int64Ptr(1),
9798
WorkerMachineCount: pointer.Int64Ptr(1),
9899
},
100+
ControlPlaneWaiters: input.ControlPlaneWaiters,
99101
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
100102
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
101103
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),
@@ -128,6 +130,7 @@ func MachineRemediationSpec(ctx context.Context, inputGetter func() MachineRemed
128130
ControlPlaneMachineCount: pointer.Int64Ptr(3),
129131
WorkerMachineCount: pointer.Int64Ptr(1),
130132
},
133+
ControlPlaneWaiters: input.ControlPlaneWaiters,
131134
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
132135
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
133136
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/node_drain_timeout.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type NodeDrainTimeoutSpecInput struct {
4343
BootstrapClusterProxy framework.ClusterProxy
4444
ArtifactFolder string
4545
SkipCleanup bool
46+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4647

4748
// Flavor, if specified, must refer to a template that contains
4849
// a KubeadmControlPlane resource with spec.machineTemplate.nodeDrainTimeout
@@ -96,6 +97,7 @@ func NodeDrainTimeoutSpec(ctx context.Context, inputGetter func() NodeDrainTimeo
9697
ControlPlaneMachineCount: pointer.Int64Ptr(int64(controlPlaneReplicas)),
9798
WorkerMachineCount: pointer.Int64Ptr(1),
9899
},
100+
ControlPlaneWaiters: input.ControlPlaneWaiters,
99101
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
100102
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
101103
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

test/e2e/quick_start.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type QuickStartSpecInput struct {
3939
BootstrapClusterProxy framework.ClusterProxy
4040
ArtifactFolder string
4141
SkipCleanup bool
42+
ControlPlaneWaiters clusterctl.ControlPlaneWaiters
4243

4344
// Flavor, if specified is the template flavor used to create the cluster for testing.
4445
// If not specified, and the e2econfig variable IPFamily is IPV6, then "ipv6" is used,
@@ -96,6 +97,7 @@ func QuickStartSpec(ctx context.Context, inputGetter func() QuickStartSpecInput)
9697
ControlPlaneMachineCount: pointer.Int64Ptr(1),
9798
WorkerMachineCount: pointer.Int64Ptr(1),
9899
},
100+
ControlPlaneWaiters: input.ControlPlaneWaiters,
99101
WaitForClusterIntervals: input.E2EConfig.GetIntervals(specName, "wait-cluster"),
100102
WaitForControlPlaneIntervals: input.E2EConfig.GetIntervals(specName, "wait-control-plane"),
101103
WaitForMachineDeployments: input.E2EConfig.GetIntervals(specName, "wait-worker-nodes"),

0 commit comments

Comments
 (0)