The fix in #9233 wasn't correct, as it was looking for number of replicas in a "random" ReplicaSet. If the deployment has multiple replica sets, it leads to unexpected results. Instead, read the Deployment resource directly. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com> (cherry picked from commit 780a1f198a5eedd33a27060bdf116bd3a3b26426)