Skip to content

Commit 47bdf71

Browse files
Fix v1beta1 MachinesReady condition
1 parent cba5e40 commit 47bdf71

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/controllers/machineset/machineset_controller.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,11 @@ func (r *Reconciler) reconcileV1Beta1Status(ctx context.Context, s *scope) error
12631263

12641264
// Aggregate the operational state of all the machines; while aggregating we are adding the
12651265
// source ref (reason@machine/name) so the problem can be easily tracked down to its source machine.
1266-
v1beta1conditions.SetAggregate(ms, clusterv1.MachinesReadyV1Beta1Condition, collections.FromMachines(filteredMachines...).ConditionGetters(), v1beta1conditions.AddSourceRef())
1266+
if len(filteredMachines) > 0 {
1267+
v1beta1conditions.SetAggregate(ms, clusterv1.MachinesReadyV1Beta1Condition, collections.FromMachines(filteredMachines...).ConditionGetters(), v1beta1conditions.AddSourceRef())
1268+
} else {
1269+
v1beta1conditions.MarkTrue(ms, clusterv1.MachinesReadyV1Beta1Condition)
1270+
}
12671271

12681272
return nil
12691273
}

0 commit comments

Comments
 (0)