Skip to content

Commit

Permalink
fix issue #135: update all pod if partition > replicas (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdsteelRail committed Jan 6, 2024
1 parent 0936b0d commit 5d71851
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controllers/collaset/synccontrol/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func decidePodToUpdateByPartition(cls *appsv1alpha1.CollaSet, podInfos []*PodUpd
sort.Sort(ordered)

partition := int(*cls.Spec.UpdateStrategy.RollingUpdate.ByPartition.Partition)
if partition >= len(podInfos) {
return podInfos
}
podToUpdate = podInfos[:partition]
for i := partition; i < len(podInfos); i++ {
if podInfos[i].PodDecorationChanged {
Expand Down

0 comments on commit 5d71851

Please sign in to comment.