Skip to content

Commit

Permalink
fix: change to ensure maxsurge=0 and 1 after testing
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Case <richard.case@outlook.com>
  • Loading branch information
richardcase committed Nov 16, 2023
1 parent 055e268 commit b2904bd
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func patchRKE2ControlPlane(ctx context.Context, patchHelper *patch.Helper, rcp *
func (r *RKE2ControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {
c, err := ctrl.NewControllerManagedBy(mgr).
For(&controlplanev1.RKE2ControlPlane{}).
Owns(&clusterv1.Machine{}).
Build(r)
if err != nil {
return errors.Wrap(err, "failed setting up with a controller manager")
Expand Down Expand Up @@ -464,14 +465,6 @@ func (r *RKE2ControlPlaneReconciler) reconcileNormal(
return result, err
}

// Check if there are any machines with a deletion timestamp set and requeue, we should
// wait for them to be deleted first.
if controlPlane.HasDeletingMachine() {
logger.Info("Waiting for deleting machines to be deleted first")

return ctrl.Result{RequeueAfter: deleteRequeueAfter}, nil
}

// Control plane machines rollout due to configuration changes (e.g. upgrades) takes precedence over other operations.
needRollout := controlPlane.MachinesNeedingRollout()

Expand Down

0 comments on commit b2904bd

Please sign in to comment.