Skip to content

Commit

Permalink
Issue 477: Handling Segmentstore STS upgrade (#478)
Browse files Browse the repository at this point in the history
Signed-off-by: SrishT <[email protected]>

Co-authored-by: SrishT <[email protected]>
  • Loading branch information
SrishT and SrishT authored Nov 11, 2020
1 parent a466ce4 commit da3a020
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/pravegacluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package pravegacluster
import (
"context"
"fmt"
"sort"
"time"

pravegav1beta1 "github.com/pravega/pravega-operator/pkg/apis/pravega/v1beta1"
Expand Down Expand Up @@ -655,6 +656,10 @@ func (r *ReconcilePravegaCluster) getOneOutdatedPod(sts *appsv1.StatefulSet, ver
return nil, err
}

sort.SliceStable(podList.Items, func(i int, j int) bool {
return podList.Items[i].Name < podList.Items[j].Name
})

for _, podItem := range podList.Items {
if util.GetPodVersion(&podItem) == version {
continue
Expand Down

0 comments on commit da3a020

Please sign in to comment.