@@ -77,6 +77,8 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
77
77
78
78
if err := patchHelper .Patch (ctx , m , patch.WithOwnedConditions {Conditions : []clusterv1.ConditionType {
79
79
clusterv1 .MachineOwnerRemediatedCondition ,
80
+ }}, patch.WithOwnedV1Beta2Conditions {Conditions : []string {
81
+ clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
80
82
}}); err != nil {
81
83
errList = append (errList , err )
82
84
}
@@ -141,8 +143,6 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
141
143
142
144
patchHelper , err := patch .NewHelper (machineToBeRemediated , r .Client )
143
145
if err != nil {
144
- log .Error (err , "failed to create patch helper" )
145
-
146
146
return ctrl.Result {}, err
147
147
}
148
148
@@ -206,7 +206,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
206
206
Type : clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
207
207
Status : metav1 .ConditionFalse ,
208
208
Reason : controlplanev1 .KubeadmControlPlaneMachineRemediationDeferredV1Beta2Reason ,
209
- Message : "KCP waiting for control plane machine provisioning to complete before triggering remediation" ,
209
+ Message : "KCP waiting for control plane Machine provisioning to complete before triggering remediation" ,
210
210
})
211
211
return ctrl.Result {}, nil
212
212
}
@@ -220,7 +220,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
220
220
Type : clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
221
221
Status : metav1 .ConditionFalse ,
222
222
Reason : controlplanev1 .KubeadmControlPlaneMachineRemediationDeferredV1Beta2Reason ,
223
- Message : "KCP waiting for control plane machine deletion to complete before triggering remediation" ,
223
+ Message : "KCP waiting for control plane Machine deletion to complete before triggering remediation" ,
224
224
})
225
225
return ctrl.Result {}, nil
226
226
}
@@ -248,7 +248,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
248
248
Type : clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
249
249
Status : metav1 .ConditionFalse ,
250
250
Reason : controlplanev1 .KubeadmControlPlaneMachineCannotBeRemediatedV1Beta2Reason ,
251
- Message : "KCP can't remediate this machine because this could result in etcd loosing quorum" ,
251
+ Message : "KCP can't remediate this Machine because this could result in etcd loosing quorum" ,
252
252
})
253
253
return ctrl.Result {}, nil
254
254
}
@@ -279,7 +279,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
279
279
Type : clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
280
280
Status : metav1 .ConditionFalse ,
281
281
Reason : controlplanev1 .KubeadmControlPlaneMachineCannotBeRemediatedV1Beta2Reason ,
282
- Message : "KCP can't remediate this machine because there is no healthy machine to forward etcd leadership to" ,
282
+ Message : "KCP can't remediate this Machine because there is no healthy Machine to forward etcd leadership to" ,
283
283
})
284
284
return ctrl.Result {}, nil
285
285
}
@@ -320,7 +320,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileUnhealthyMachines(ctx context.C
320
320
v1beta2conditions .Set (machineToBeRemediated , metav1.Condition {
321
321
Type : clusterv1 .MachineOwnerRemediatedV1Beta2Condition ,
322
322
Status : metav1 .ConditionFalse ,
323
- Reason : controlplanev1 .KubeadmControlPlaneMachineRemediationDoneV1Beta2Reason ,
323
+ Reason : controlplanev1 .KubeadmControlPlaneMachineRemediationMachineDeletedV1Beta2Reason ,
324
324
})
325
325
326
326
// Prepare the info for tracking the remediation progress into the RemediationInProgressAnnotation.
@@ -524,7 +524,6 @@ func (r *KubeadmControlPlaneReconciler) canSafelyRemoveEtcdMember(ctx context.Co
524
524
}
525
525
526
526
// Check member health as reported by machine's health conditions
527
- // TODO: note as phase 2 task
528
527
if ! conditions .IsTrue (machine , controlplanev1 .MachineEtcdMemberHealthyCondition ) {
529
528
targetUnhealthyMembers ++
530
529
unhealthyMembers = append (unhealthyMembers , fmt .Sprintf ("%s (%s)" , etcdMember , machine .Name ))
0 commit comments