Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkg/controllers/machinesetsync/machineset_sync_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,23 @@ func (r *MachineSetSyncReconciler) Reconcile(ctx context.Context, req reconcile.
}

if mapiMachineSet == nil {
if capiMachineSet == nil {
logger.Info("Both MAPI and CAPI machine sets not found, nothing to do")
return ctrl.Result{}, nil
}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
// The MAPI MachineSet has already been deleted.
// If the CAPI MachineSet is deleting and still has our sync finalizer,
// reconcile its deletion so the finalizer can be removed.
if shouldRequeue, err := r.reconcileCAPItoMAPIMachineSetDeletion(ctx, nil, capiMachineSet); err != nil {
return ctrl.Result{}, fmt.Errorf(
"failed to reconcile Cluster API machine set deletion: %w",
err,
)
} else if shouldRequeue {
return ctrl.Result{}, nil
}

logger.Info("Only CAPI machine set found, nothing to do")
return ctrl.Result{}, nil
}
Expand Down