Skip to content

Commit

Permalink
removed useless found variable
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-kun committed Jan 10, 2023
1 parent 4b960b9 commit 92972a3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cluster-autoscaler/cloudprovider/mcm/mcm_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,22 +401,16 @@ func (m *McmManager) GetMachineDeploymentSize(machinedeployment *MachineDeployme
}

func isRollingUpdateFinished(md *v1alpha1.MachineDeployment) bool {
found := false
for _, cond := range md.Status.Conditions {
switch {
case cond.Type == machineDeploymentProgressing && cond.Status == conditionTrue && cond.Reason == newISAvailableReason:
return true
case cond.Type == machineDeploymentProgressing:
found = true
break
return false
}
}
if !found {
// no "Progressing" condition means the deployment has not undergone any rolling update yet
return true
}

return false
// no "Progressing" condition means the deployment has not undergone any rolling update yet
return true
}

// SetMachineDeploymentSize sets the desired size for the Machinedeployment.
Expand Down

0 comments on commit 92972a3

Please sign in to comment.