From 3b110621e55d49773a8e086cea4f82caf847640f Mon Sep 17 00:00:00 2001 From: Vince Prignano Date: Thu, 18 Jul 2024 20:09:12 -0700 Subject: [PATCH] :bug: When infrastructureRef is nil, set InfrastructureReadyCondition to true Some clients, like MachineHealthCheck are checking this condition to continue operations. Set it for backward compatibility Signed-off-by: Vince Prignano --- internal/controllers/cluster/cluster_controller_phases.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/controllers/cluster/cluster_controller_phases.go b/internal/controllers/cluster/cluster_controller_phases.go index cdc8e62fb09d..4afa3976f5e9 100644 --- a/internal/controllers/cluster/cluster_controller_phases.go +++ b/internal/controllers/cluster/cluster_controller_phases.go @@ -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 }