Skip to content

Commit 6fd1997

Browse files
committed
Follow-ups to introduction of initialization structs
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent 3656b49 commit 6fd1997

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

api/core/v1beta2/cluster_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,6 @@ type ClusterStatus struct {
10111011

10121012
// ClusterInitializationStatus provides observations of the Cluster initialization process.
10131013
// NOTE: Fields in this struct are part of the Cluster API contract and are used to orchestrate initial Cluster provisioning.
1014-
1015-
// ClusterInitializationStatus provides observations of the Cluster initialization process.
10161014
type ClusterInitializationStatus struct {
10171015
// infrastructureProvisioned is true when the infrastructure provider reports that Cluster's infrastructure is fully provisioned.
10181016
// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate provisioning.

cmd/clusterctl/client/cluster/mover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (o *objectMover) checkProvisioningCompleted(ctx context.Context, graph *obj
252252
continue
253253
}
254254

255-
if clusterObj.Spec.ControlPlaneRef != nil && clusterObj.Status.Initialization == nil || !ptr.Deref(clusterObj.Status.Initialization.ControlPlaneInitialized, false) {
255+
if clusterObj.Spec.ControlPlaneRef != nil && (clusterObj.Status.Initialization == nil || !ptr.Deref(clusterObj.Status.Initialization.ControlPlaneInitialized, false)) {
256256
errList = append(errList, errors.Errorf("cannot start the move operation while the control plane for %q %s/%s is not yet initialized", clusterObj.GroupVersionKind(), clusterObj.GetNamespace(), clusterObj.GetName()))
257257
continue
258258
}

exp/internal/controllers/machinepool_controller_phases.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func (r *MachinePoolReconciler) reconcileInfrastructure(ctx context.Context, s *
321321
return ctrl.Result{}, kerrors.NewAggregate([]error{errors.Wrapf(err, "failed to reconcile Machines for MachinePool %s", klog.KObj(mp)), errors.Wrapf(getNodeRefsErr, "failed to get nodeRefs for MachinePool %s", klog.KObj(mp))})
322322
}
323323

324-
if mp.Status.Initialization == nil && !ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) {
324+
if mp.Status.Initialization == nil || !ptr.Deref(mp.Status.Initialization.InfrastructureProvisioned, false) {
325325
log.Info("Infrastructure provider is not yet ready", infraConfig.GetKind(), klog.KObj(infraConfig))
326326
return ctrl.Result{}, nil
327327
}

0 commit comments

Comments
 (0)