What this PR does / why we need it:
This PR modifies the Refresh method of CA to reset the priority annotation on the machine objects only if the number of annotated machines is more than desired. The desired count is totalMachines - mcd.Spec.Replicas. Terminating and Failed machines are excluded while calculating the total number of annotated machines.
Which issue(s) this PR fixes:
Fixes #328
Special notes for your reviewer:
Release note:
The Refresh method resets the priority annotation on machines with priority 1 to match the desired count. Refer to the PR for details on how the desired count is calculated.
What this PR does / why we need it: This PR modifies the
Refresh
method of CA to reset the priority annotation on the machine objects only if the number of annotated machines is more than desired. The desired count istotalMachines - mcd.Spec.Replicas
.Terminating
andFailed
machines are excluded while calculating the total number of annotated machines.Which issue(s) this PR fixes: Fixes #328
Special notes for your reviewer:
Release note: