Skip to content

Commit

Permalink
chore: comment changes from review
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 b2904bd commit 37320ae
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,10 @@ func (r *RKE2ControlPlaneReconciler) upgradeControlPlane(

switch rcp.Spec.RolloutStrategy.Type {
case controlplanev1.RollingUpdateStrategyType:
// RolloutStrategy is currently defaulted and validated to be RollingUpdate
// We can ignore MaxUnavailable because we are enforcing health checks before we get here.
// RolloutStrategy is currently defaulted and validated to be RollingUpdate.
maxNodes := *rcp.Spec.Replicas + int32(rcp.Spec.RolloutStrategy.RollingUpdate.MaxSurge.IntValue())
if int32(controlPlane.Machines.Len()) < maxNodes {
// scaleUp ensures that we don't continue scaling up while waiting for Machines to have NodeRefs
// scaleUpControlPlane ensures that we don't continue scaling up while waiting for Machines to have NodeRefs
return r.scaleUpControlPlane(ctx, cluster, rcp, controlPlane)
}

Expand Down

0 comments on commit 37320ae

Please sign in to comment.