Skip to content

Commit

Permalink
Merge pull request #11439 from phoenixsqf/main
Browse files Browse the repository at this point in the history
use intstr.GetScaledValueFromIntOrPercent instead of the deprecated
  • Loading branch information
mattfarina committed Jan 9, 2023
2 parents 946967f + 9d59d92 commit 774c6ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kube/ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (c *ReadyChecker) daemonSetReady(ds *appsv1.DaemonSet) bool {
c.log("DaemonSet is not ready: %s/%s. %d out of %d expected pods have been scheduled", ds.Namespace, ds.Name, ds.Status.UpdatedNumberScheduled, ds.Status.DesiredNumberScheduled)
return false
}
maxUnavailable, err := intstr.GetValueFromIntOrPercent(ds.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable, int(ds.Status.DesiredNumberScheduled), true)
maxUnavailable, err := intstr.GetScaledValueFromIntOrPercent(ds.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable, int(ds.Status.DesiredNumberScheduled), true)
if err != nil {
// If for some reason the value is invalid, set max unavailable to the
// number of desired replicas. This is the same behavior as the
Expand Down

0 comments on commit 774c6ce

Please sign in to comment.