Skip to content

Commit

Permalink
🐛 When infrastructureRef is nil, set InfrastructureReadyCondition to …
Browse files Browse the repository at this point in the history
…true

Some clients, like MachineHealthCheck are checking this condition to
continue operations. Set it for backward compatibility

Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri committed Jul 19, 2024
1 parent ad97dc5 commit 3b11062
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/controllers/cluster/cluster_controller_phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func (r *Reconciler) reconcileInfrastructure(ctx context.Context, cluster *clust
if cluster.Spec.InfrastructureRef == nil {
// If the infrastructure ref is not set, marking the infrastructure as ready (no-op).
cluster.Status.InfrastructureReady = true
conditions.MarkTrue(cluster, clusterv1.InfrastructureReadyCondition)
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 3b11062

Please sign in to comment.