@@ -29,6 +29,7 @@ import (
29
29
"k8s.io/apimachinery/pkg/util/sets"
30
30
"k8s.io/utils/ptr"
31
31
ctrl "sigs.k8s.io/controller-runtime"
32
+ "sigs.k8s.io/controller-runtime/pkg/client"
32
33
33
34
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
34
35
"sigs.k8s.io/cluster-api/controllers/clustercache"
@@ -73,8 +74,6 @@ func (r *Reconciler) reconcileStatus(ctx context.Context, s *scope) {
73
74
74
75
setAvailableCondition (ctx , s .machine )
75
76
76
- // TODO: Update the Deleting condition.
77
-
78
77
setMachinePhaseAndLastUpdated (ctx , s .machine )
79
78
}
80
79
@@ -586,10 +585,10 @@ func setReadyCondition(ctx context.Context, machine *clusterv1.Machine) {
586
585
// calculateDeletingConditionForSummary calculates a Deleting condition for the calculation of the Ready condition
587
586
// (which is done via a summary). This is necessary to avoid including the verbose details of the Deleting condition
588
587
// message in the summary.
589
- // This is important to ensure we have a limited amount of unique messages across Machines. This allows us to deduplicate
590
- // messages when aggregating Ready conditions of many Machines into the MachinesReady condition of e.g. the MachineSet.
588
+ // This is also important to ensure we have a limited amount of unique messages across Machines thus allowing to
589
+ // nicely aggregate Ready conditions from many Machines into the MachinesReady condition of e.g. the MachineSet.
591
590
// For the same reason we are only surfacing messages with "more than 30m" instead of using the exact durations.
592
- // We assume that 30m is a duration after which it makes sense to notify users that Node drains and waiting for volume
591
+ // 30 minutes is a duration after which we assume it makes sense to emphasize that Node drains and waiting for volume
593
592
// detach are still in progress.
594
593
func calculateDeletingConditionForSummary (machine * clusterv1.Machine ) v1beta2conditions.ConditionWithOwnerInfo {
595
594
deletingCondition := v1beta2conditions .Get (machine , clusterv1 .MachineDeletingV1Beta2Condition )
0 commit comments