The wait logic for Deployments and Daemonsets subtracts their
maxUnavailable value from the amount of replicas they should
have ready. This can lead to waiting for 0 pods to be ready.
This change ensures at least 1 replica is ready, unless there
are 0 desired replicas.
Fixes#8660.
This is based on https://github.com/helm/helm/pull/8671 by
Sean Eagan which was never merged.
Co-authored-by: Sean Eagan <seaneagan1@gmail.com>
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
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)
returnfalse
}
// Ensure the expected available replicas are ready.