Skip to content

Commit 99ca57c

Browse files
qswkspzmberg
authored andcommitted
fix: cloneset revision update (#1549)
Signed-off-by: suhe <[email protected]>
1 parent 9410fbe commit 99ca57c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/cloneset/cloneset_status.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ func (r *realStatusUpdater) calculateStatus(cs *appsv1alpha1.CloneSet, newStatus
104104
newStatus.UpdatedAvailableReplicas++
105105
}
106106
}
107-
// Consider the update revision as stable if revisions of all pods are consistent to it, no need to wait all of them ready
108-
if newStatus.UpdatedReplicas == newStatus.Replicas {
107+
// Consider the update revision as stable if revisions of all pods are consistent to it and have the expected number of replicas, no need to wait all of them ready
108+
if newStatus.UpdatedReplicas == newStatus.Replicas && newStatus.Replicas == *cs.Spec.Replicas {
109109
newStatus.CurrentRevision = newStatus.UpdateRevision
110110
}
111111

0 commit comments

Comments
 (0)