Skip to content

Commit

Permalink
fix: cloneset revision update (#1549)
Browse files Browse the repository at this point in the history
Signed-off-by: suhe <[email protected]>
  • Loading branch information
qswksp authored and zmberg committed Apr 3, 2024
1 parent 9410fbe commit 99ca57c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/cloneset/cloneset_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ func (r *realStatusUpdater) calculateStatus(cs *appsv1alpha1.CloneSet, newStatus
newStatus.UpdatedAvailableReplicas++
}
}
// Consider the update revision as stable if revisions of all pods are consistent to it, no need to wait all of them ready
if newStatus.UpdatedReplicas == newStatus.Replicas {
// 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
if newStatus.UpdatedReplicas == newStatus.Replicas && newStatus.Replicas == *cs.Spec.Replicas {
newStatus.CurrentRevision = newStatus.UpdateRevision
}

Expand Down

0 comments on commit 99ca57c

Please sign in to comment.