Skip to content

Commit f6cd8d7

Browse files
authored
Merge pull request #1854 from vincepri/sync-cluster-ready
⚠️ Sync InfraCluster.Status.Ready to Cluster object
2 parents 468a17f + e05d0f0 commit f6cd8d7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

controllers/cluster_controller_phases.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,14 @@ func (r *ClusterReconciler) reconcileInfrastructure(ctx context.Context, cluster
157157
}
158158

159159
// Determine if the infrastructure provider is ready.
160-
if !cluster.Status.InfrastructureReady {
161-
ready, err := external.IsReady(infraConfig)
162-
if err != nil {
163-
return err
164-
} else if !ready {
165-
logger.V(3).Info("Infrastructure provider is not ready yet")
166-
return nil
167-
}
168-
cluster.Status.InfrastructureReady = true
160+
ready, err := external.IsReady(infraConfig)
161+
if err != nil {
162+
return err
163+
}
164+
cluster.Status.InfrastructureReady = ready
165+
if !ready {
166+
logger.V(3).Info("Infrastructure provider is not ready yet")
167+
return nil
169168
}
170169

171170
// Get and parse Status.APIEndpoint field from the infrastructure provider.

0 commit comments

Comments
 (0)