Skip to content

Commit f496ad9

Browse files
authored
Merge pull request #11422 from sbueringer/pr-condition-improvements
🌱 Various improvements of v1beta2 conditions
2 parents 7dd613c + d7471a5 commit f496ad9

31 files changed

+364
-266
lines changed

api/v1beta1/cluster_types.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ const (
6868
ClusterTopologyReconciledV1Beta2Condition = "TopologyReconciled"
6969

7070
// ClusterTopologyReconcileSucceededV1Beta2Reason documents the reconciliation of a Cluster topology succeeded.
71-
ClusterTopologyReconcileSucceededV1Beta2Reason = "TopologyReconcileSucceeded"
71+
ClusterTopologyReconcileSucceededV1Beta2Reason = "ReconcileSucceeded"
7272

7373
// ClusterTopologyReconciledFailedV1Beta2Reason documents the reconciliation of a Cluster topology
7474
// failing due to an error.
75-
ClusterTopologyReconciledFailedV1Beta2Reason = "TopologyReconcileFailed"
75+
ClusterTopologyReconciledFailedV1Beta2Reason = "ReconcileFailed"
7676

7777
// ClusterTopologyReconciledControlPlaneUpgradePendingV1Beta2Reason documents reconciliation of a Cluster topology
7878
// not yet completed because Control Plane is not yet updated to match the desired topology spec.
@@ -113,9 +113,9 @@ const (
113113
// with the ClusterClass surfaced in the ClusterClass status or controller logs.
114114
ClusterTopologyReconciledClusterClassNotReconciledV1Beta2Reason = "ClusterClassNotReconciled"
115115

116-
// ClusterTopologyReconciledDeletionTimestampSetV1Beta2Reason surfaces when the Cluster is deleting because the
116+
// ClusterTopologyReconciledDeletingV1Beta2Reason surfaces when the Cluster is deleting because the
117117
// DeletionTimestamp is set.
118-
ClusterTopologyReconciledDeletionTimestampSetV1Beta2Reason = DeletionTimestampSetV1Beta2Reason
118+
ClusterTopologyReconciledDeletingV1Beta2Reason = DeletingV1Beta2Reason
119119

120120
// ClusterTopologyReconcilePausedV1Beta2Reason surfaces when the Cluster is paused.
121121
ClusterTopologyReconcilePausedV1Beta2Reason = PausedV1Beta2Reason
@@ -316,7 +316,7 @@ const (
316316

317317
// ClusterNotScalingDownV1Beta2Reason surfaces when none of the Cluster's control plane, MachineDeployments,
318318
// MachinePools and stand-alone MachineSets are scaling down.
319-
ClusterNotScalingDownV1Beta2Reason = NotScalingUpV1Beta2Reason
319+
ClusterNotScalingDownV1Beta2Reason = NotScalingDownV1Beta2Reason
320320

321321
// ClusterScalingDownUnknownV1Beta2Reason surfaces when one of the Cluster's control plane, MachineDeployments,
322322
// MachinePools and stand-alone MachineSets scaling down condition is unknown, and none true.
@@ -349,9 +349,9 @@ const (
349349
// ClusterDeletingV1Beta2Condition surfaces details about ongoing deletion of the cluster.
350350
ClusterDeletingV1Beta2Condition = DeletingV1Beta2Condition
351351

352-
// ClusterDeletingDeletionTimestampNotSetV1Beta2Reason surfaces when the Cluster is not deleting because the
352+
// ClusterNotDeletingV1Beta2Reason surfaces when the Cluster is not deleting because the
353353
// DeletionTimestamp is not set.
354-
ClusterDeletingDeletionTimestampNotSetV1Beta2Reason = DeletionTimestampNotSetV1Beta2Reason
354+
ClusterNotDeletingV1Beta2Reason = NotDeletingV1Beta2Reason
355355

356356
// ClusterDeletingWaitingForBeforeDeleteHookV1Beta2Reason surfaces when the Cluster deletion
357357
// waits for the ClusterDelete hooks to allow deletion to complete.

api/v1beta1/machine_types.go

+6-11
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ const (
237237

238238
// MachineNodeDoesNotExistV1Beta2Reason surfaces when the node hosted on the machine does not exist.
239239
// Note: this could happen when creating the machine. However, this state should be treated as an error if it lasts indefinitely.
240-
MachineNodeDoesNotExistV1Beta2Reason = ObjectDoesNotExistV1Beta2Reason
240+
MachineNodeDoesNotExistV1Beta2Reason = "NodeDoesNotExist"
241241

242242
// MachineNodeDeletedV1Beta2Reason surfaces when the node hosted on the machine has been deleted.
243243
// Note: controllers can't identify if the Node was deleted by the controller itself, e.g.
244244
// during the deletion workflow, or by a users.
245-
MachineNodeDeletedV1Beta2Reason = ObjectDeletedV1Beta2Reason
245+
MachineNodeDeletedV1Beta2Reason = "NodeDeleted"
246246

247247
// MachineNodeInspectionFailedV1Beta2Reason documents a failure when inspecting the status of a Node.
248248
MachineNodeInspectionFailedV1Beta2Reason = InspectionFailedV1Beta2Reason
@@ -317,18 +317,13 @@ const (
317317
// MachineDeletingV1Beta2Condition surfaces details about progress in the machine deletion workflow.
318318
MachineDeletingV1Beta2Condition = DeletingV1Beta2Condition
319319

320-
// MachineDeletingV1Beta2Reason surfaces when the Machine is deleting.
321-
// This reason is only used for the MachineDeletingV1Beta2Condition when calculating the
322-
// Ready condition when the deletionTimestamp on a Machine is set.
323-
MachineDeletingV1Beta2Reason = "Deleting"
324-
325-
// MachineDeletingDeletionTimestampNotSetV1Beta2Reason surfaces when the Machine is not deleting because the
320+
// MachineNotDeletingV1Beta2Reason surfaces when the Machine is not deleting because the
326321
// DeletionTimestamp is not set.
327-
MachineDeletingDeletionTimestampNotSetV1Beta2Reason = DeletionTimestampNotSetV1Beta2Reason
322+
MachineNotDeletingV1Beta2Reason = NotDeletingV1Beta2Reason
328323

329-
// MachineDeletingDeletionTimestampSetV1Beta2Reason surfaces when the Machine is deleting because the
324+
// MachineDeletingV1Beta2Reason surfaces when the Machine is deleting because the
330325
// DeletionTimestamp is set. This reason is used if none of the more specific reasons apply.
331-
MachineDeletingDeletionTimestampSetV1Beta2Reason = DeletionTimestampSetV1Beta2Reason
326+
MachineDeletingV1Beta2Reason = DeletingV1Beta2Reason
332327

333328
// MachineDeletingInternalErrorV1Beta2Reason surfaces unexpected failures when deleting a Machine.
334329
MachineDeletingInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason

api/v1beta1/machinedeployment_types.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ const (
208208
// MachineDeploymentDeletingV1Beta2Condition surfaces details about ongoing deletion of the controlled machines.
209209
MachineDeploymentDeletingV1Beta2Condition = DeletingV1Beta2Condition
210210

211-
// MachineDeploymentDeletingDeletionTimestampNotSetV1Beta2Reason surfaces when the MachineDeployment is not deleting because the
211+
// MachineDeploymentNotDeletingV1Beta2Reason surfaces when the MachineDeployment is not deleting because the
212212
// DeletionTimestamp is not set.
213-
MachineDeploymentDeletingDeletionTimestampNotSetV1Beta2Reason = DeletionTimestampNotSetV1Beta2Reason
213+
MachineDeploymentNotDeletingV1Beta2Reason = NotDeletingV1Beta2Reason
214214

215-
// MachineDeploymentDeletingDeletionTimestampSetV1Beta2Reason surfaces when the MachineDeployment is deleting because the
215+
// MachineDeploymentDeletingV1Beta2Reason surfaces when the MachineDeployment is deleting because the
216216
// DeletionTimestamp is set.
217-
MachineDeploymentDeletingDeletionTimestampSetV1Beta2Reason = DeletionTimestampSetV1Beta2Reason
217+
MachineDeploymentDeletingV1Beta2Reason = DeletingV1Beta2Reason
218218

219219
// MachineDeploymentDeletingInternalErrorV1Beta2Reason surfaces unexpected failures when deleting a MachineDeployment.
220220
MachineDeploymentDeletingInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason

api/v1beta1/machineset_types.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -199,25 +199,25 @@ const (
199199
// MachineSetMachineRemediationDeferredV1Beta2Reason surfaces when remediation of a MachineSet machine must be deferred.
200200
MachineSetMachineRemediationDeferredV1Beta2Reason = "RemediationDeferred"
201201

202-
// MachineSetMachineRemediationMachineDeletedV1Beta2Reason surfaces when remediation of a MachineSet machine
202+
// MachineSetMachineRemediationMachineDeletingV1Beta2Reason surfaces when remediation of a MachineSet machine
203203
// has been completed by deleting the unhealthy machine.
204204
// Note: After an unhealthy machine is deleted, a new one is created by the MachineSet as part of the
205205
// regular reconcile loop that ensures the correct number of replicas exist.
206-
MachineSetMachineRemediationMachineDeletedV1Beta2Reason = "MachineDeleted"
206+
MachineSetMachineRemediationMachineDeletingV1Beta2Reason = "MachineDeleting"
207207
)
208208

209209
// MachineSet's Deleting condition and corresponding reasons that will be used in v1Beta2 API version.
210210
const (
211211
// MachineSetDeletingV1Beta2Condition surfaces details about ongoing deletion of the controlled machines.
212212
MachineSetDeletingV1Beta2Condition = DeletingV1Beta2Condition
213213

214-
// MachineSetDeletingDeletionTimestampNotSetV1Beta2Reason surfaces when the MachineSet is not deleting because the
214+
// MachineSetNotDeletingV1Beta2Reason surfaces when the MachineSet is not deleting because the
215215
// DeletionTimestamp is not set.
216-
MachineSetDeletingDeletionTimestampNotSetV1Beta2Reason = DeletionTimestampNotSetV1Beta2Reason
216+
MachineSetNotDeletingV1Beta2Reason = NotDeletingV1Beta2Reason
217217

218-
// MachineSetDeletingDeletionTimestampSetV1Beta2Reason surfaces when the MachineSet is deleting because the
218+
// MachineSetDeletingV1Beta2Reason surfaces when the MachineSet is deleting because the
219219
// DeletionTimestamp is set.
220-
MachineSetDeletingDeletionTimestampSetV1Beta2Reason = DeletionTimestampSetV1Beta2Reason
220+
MachineSetDeletingV1Beta2Reason = DeletingV1Beta2Reason
221221

222222
// MachineSetDeletingInternalErrorV1Beta2Reason surfaces unexpected failures when deleting a MachineSet.
223223
MachineSetDeletingInternalErrorV1Beta2Reason = InternalErrorV1Beta2Reason

api/v1beta1/v1beta2_condition_consts.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ const (
169169
// ConnectionDownV1Beta2Reason surfaces that the connection to the workload cluster is down.
170170
ConnectionDownV1Beta2Reason = "ConnectionDown"
171171

172-
// DeletionTimestampNotSetV1Beta2Reason surfaces when an object is not deleting because the
172+
// NotDeletingV1Beta2Reason surfaces when an object is not deleting because the
173173
// DeletionTimestamp is not set.
174-
DeletionTimestampNotSetV1Beta2Reason = "DeletionTimestampNotSet"
174+
NotDeletingV1Beta2Reason = "NotDeleting"
175175

176-
// DeletionTimestampSetV1Beta2Reason surfaces when an object is deleting because the
176+
// DeletingV1Beta2Reason surfaces when an object is deleting because the
177177
// DeletionTimestamp is set. This reason is used if none of the more specific reasons apply.
178-
DeletionTimestampSetV1Beta2Reason = "DeletionTimestampSet"
178+
DeletingV1Beta2Reason = "Deleting"
179179

180180
// DeletionCompletedV1Beta2Reason surfaces when the deletion process has been completed.
181181
// This reason is set right after the corresponding finalizer is removed.

controlplane/kubeadm/api/v1beta1/v1beta2_condition_consts.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,23 +238,23 @@ const (
238238
// KubeadmControlPlaneMachineRemediationDeferredV1Beta2Reason surfaces when remediation of a control plane machine must be deferred.
239239
KubeadmControlPlaneMachineRemediationDeferredV1Beta2Reason = "RemediationDeferred"
240240

241-
// KubeadmControlPlaneMachineRemediationMachineDeletedV1Beta2Reason surfaces when remediation of a control plane machine
241+
// KubeadmControlPlaneMachineRemediationMachineDeletingV1Beta2Reason surfaces when remediation of a control plane machine
242242
// has been completed by deleting the unhealthy machine.
243243
// Note: After an unhealthy machine is deleted, a new one is created by the KubeadmControlPlaneMachine as part of the
244244
// regular reconcile loop that ensures the correct number of replicas exist; KubeadmControlPlane machine waits for
245245
// the new machine to exists before removing the controlplane.cluster.x-k8s.io/remediation-in-progress annotation.
246246
// This is part of a series of safeguards to ensure that operation are performed sequentially on control plane machines.
247-
KubeadmControlPlaneMachineRemediationMachineDeletedV1Beta2Reason = "MachineDeleted"
247+
KubeadmControlPlaneMachineRemediationMachineDeletingV1Beta2Reason = "MachineDeleting"
248248
)
249249

250250
// KubeadmControlPlane's Deleting condition and corresponding reasons that will be used in v1Beta2 API version.
251251
const (
252252
// KubeadmControlPlaneDeletingV1Beta2Condition surfaces details about ongoing deletion of the controlled machines.
253253
KubeadmControlPlaneDeletingV1Beta2Condition = clusterv1.DeletingV1Beta2Condition
254254

255-
// KubeadmControlPlaneDeletingDeletionTimestampNotSetV1Beta2Reason surfaces when the KCP is not deleting because the
255+
// KubeadmControlPlaneNotDeletingV1Beta2Reason surfaces when the KCP is not deleting because the
256256
// DeletionTimestamp is not set.
257-
KubeadmControlPlaneDeletingDeletionTimestampNotSetV1Beta2Reason = clusterv1.DeletionTimestampNotSetV1Beta2Reason
257+
KubeadmControlPlaneNotDeletingV1Beta2Reason = clusterv1.NotDeletingV1Beta2Reason
258258

259259
// KubeadmControlPlaneDeletingWaitingForWorkersDeletionV1Beta2Reason surfaces when the KCP deletion
260260
// waits for the workers to be deleted.

controlplane/kubeadm/internal/controllers/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileDelete(ctx context.Context, con
597597
// If no control plane machines remain, remove the finalizer
598598
if len(controlPlane.Machines) == 0 {
599599
controlPlane.DeletingReason = controlplanev1.KubeadmControlPlaneDeletingDeletionCompletedV1Beta2Reason
600-
controlPlane.DeletingMessage = ""
600+
controlPlane.DeletingMessage = "Deletion completed"
601601

602602
controllerutil.RemoveFinalizer(controlPlane.KCP, controlplanev1.KubeadmControlPlaneFinalizer)
603603
return ctrl.Result{}, nil

controlplane/kubeadm/internal/controllers/controller_test.go

+22-22
Original file line numberDiff line numberDiff line change
@@ -2012,49 +2012,49 @@ func TestKubeadmControlPlaneReconciler_reconcileControlPlaneAndMachinesCondition
20122012
Status: metav1.ConditionUnknown,
20132013
Reason: controlplanev1.KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason,
20142014
Message: "* Machine machine1-test:\n" +
2015-
" * EtcdMemberHealthy: Node does not exist",
2015+
" * EtcdMemberHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID",
20162016
},
20172017
{
20182018
Type: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition,
20192019
Status: metav1.ConditionUnknown,
20202020
Reason: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason,
20212021
Message: "* Machine machine1-test:\n" +
2022-
" * APIServerPodHealthy: Node does not exist\n" +
2023-
" * ControllerManagerPodHealthy: Node does not exist\n" +
2024-
" * SchedulerPodHealthy: Node does not exist\n" +
2025-
" * EtcdPodHealthy: Node does not exist",
2022+
" * APIServerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2023+
" * ControllerManagerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2024+
" * SchedulerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2025+
" * EtcdPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID",
20262026
},
20272027
},
20282028
expectMachineConditions: []metav1.Condition{
20292029
{
20302030
Type: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyV1Beta2Condition,
20312031
Status: metav1.ConditionUnknown,
20322032
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2033-
Message: "Node does not exist",
2033+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
20342034
},
20352035
{
20362036
Type: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyV1Beta2Condition,
20372037
Status: metav1.ConditionUnknown,
20382038
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2039-
Message: "Node does not exist",
2039+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
20402040
},
20412041
{
20422042
Type: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyV1Beta2Condition,
20432043
Status: metav1.ConditionUnknown,
20442044
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2045-
Message: "Node does not exist",
2045+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
20462046
},
20472047
{
20482048
Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyV1Beta2Condition,
20492049
Status: metav1.ConditionUnknown,
20502050
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2051-
Message: "Node does not exist",
2051+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
20522052
},
20532053
{
20542054
Type: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyV1Beta2Condition,
20552055
Status: metav1.ConditionUnknown,
20562056
Reason: controlplanev1.KubeadmControlPlaneMachineEtcdMemberInspectionFailedV1Beta2Reason,
2057-
Message: "Node does not exist",
2057+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
20582058
},
20592059
{
20602060
Type: clusterv1.MachineUpToDateV1Beta2Condition,
@@ -2092,49 +2092,49 @@ func TestKubeadmControlPlaneReconciler_reconcileControlPlaneAndMachinesCondition
20922092
Status: metav1.ConditionUnknown,
20932093
Reason: controlplanev1.KubeadmControlPlaneEtcdClusterHealthUnknownV1Beta2Reason,
20942094
Message: "* Machine machine1-test:\n" +
2095-
" * EtcdMemberHealthy: Node does not exist",
2095+
" * EtcdMemberHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID",
20962096
},
20972097
{
20982098
Type: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthyV1Beta2Condition,
20992099
Status: metav1.ConditionUnknown,
21002100
Reason: controlplanev1.KubeadmControlPlaneControlPlaneComponentsHealthUnknownV1Beta2Reason,
21012101
Message: "* Machine machine1-test:\n" +
2102-
" * APIServerPodHealthy: Node does not exist\n" +
2103-
" * ControllerManagerPodHealthy: Node does not exist\n" +
2104-
" * SchedulerPodHealthy: Node does not exist\n" +
2105-
" * EtcdPodHealthy: Node does not exist",
2102+
" * APIServerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2103+
" * ControllerManagerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2104+
" * SchedulerPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID\n" +
2105+
" * EtcdPodHealthy: Waiting for GenericInfrastructureMachine to report spec.providerID",
21062106
},
21072107
},
21082108
expectMachineConditions: []metav1.Condition{
21092109
{
21102110
Type: controlplanev1.KubeadmControlPlaneMachineAPIServerPodHealthyV1Beta2Condition,
21112111
Status: metav1.ConditionUnknown,
21122112
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2113-
Message: "Node does not exist",
2113+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
21142114
},
21152115
{
21162116
Type: controlplanev1.KubeadmControlPlaneMachineControllerManagerPodHealthyV1Beta2Condition,
21172117
Status: metav1.ConditionUnknown,
21182118
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2119-
Message: "Node does not exist",
2119+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
21202120
},
21212121
{
21222122
Type: controlplanev1.KubeadmControlPlaneMachineSchedulerPodHealthyV1Beta2Condition,
21232123
Status: metav1.ConditionUnknown,
21242124
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2125-
Message: "Node does not exist",
2125+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
21262126
},
21272127
{
21282128
Type: controlplanev1.KubeadmControlPlaneMachineEtcdPodHealthyV1Beta2Condition,
21292129
Status: metav1.ConditionUnknown,
21302130
Reason: controlplanev1.KubeadmControlPlaneMachinePodInspectionFailedV1Beta2Reason,
2131-
Message: "Node does not exist",
2131+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
21322132
},
21332133
{
21342134
Type: controlplanev1.KubeadmControlPlaneMachineEtcdMemberHealthyV1Beta2Condition,
21352135
Status: metav1.ConditionUnknown,
21362136
Reason: controlplanev1.KubeadmControlPlaneMachineEtcdMemberInspectionFailedV1Beta2Reason,
2137-
Message: "Node does not exist",
2137+
Message: "Waiting for GenericInfrastructureMachine to report spec.providerID",
21382138
},
21392139
{
21402140
Type: clusterv1.MachineUpToDateV1Beta2Condition,
@@ -3301,7 +3301,7 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) {
33013301
g.Expect(err).ToNot(HaveOccurred())
33023302
g.Expect(kcp.Finalizers).To(BeEmpty())
33033303
g.Expect(controlPlane.DeletingReason).To(Equal(controlplanev1.KubeadmControlPlaneDeletingDeletionCompletedV1Beta2Reason))
3304-
g.Expect(controlPlane.DeletingMessage).To(BeEmpty())
3304+
g.Expect(controlPlane.DeletingMessage).To(Equal("Deletion completed"))
33053305
})
33063306

33073307
t.Run("does not remove any control plane Machines if other Machines exist", func(t *testing.T) {
@@ -3453,7 +3453,7 @@ func TestKubeadmControlPlaneReconciler_reconcileDelete(t *testing.T) {
34533453
g.Expect(err).ToNot(HaveOccurred())
34543454
g.Expect(kcp.Finalizers).To(BeEmpty())
34553455
g.Expect(controlPlane.DeletingReason).To(Equal(controlplanev1.KubeadmControlPlaneDeletingDeletionCompletedV1Beta2Reason))
3456-
g.Expect(controlPlane.DeletingMessage).To(BeEmpty())
3456+
g.Expect(controlPlane.DeletingMessage).To(Equal("Deletion completed"))
34573457
})
34583458
}
34593459

0 commit comments

Comments
 (0)