Confirm that the current and updated revision numbers also match as part
of the readiness check. Add coverage for readiness scenarios where
StatefulSet status does not reflect the most recent generation of the
StatefulSet yet.
Also add additional logging around the sts transitions from non-ready to
ready.
Fixes: #10163
Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
c.log("StatefulSet is not ready: %s/%s. currentRevision %s does not yet match updateRevision %s",sts.Namespace,sts.Name,sts.Status.CurrentRevision,sts.Status.UpdateRevision)
returnfalse
}
c.log("StatefulSet is ready: %s/%s. %d out of %d expected pods are ready",sts.Namespace,sts.Name,sts.Status.ReadyReplicas,replicas)