Skip to content

Commit

Permalink
Update stateful_set_utils.go
Browse files Browse the repository at this point in the history
Fix all unavailable pod update new version fail
  • Loading branch information
linsongzheng committed Nov 25, 2022
1 parent 0cfd676 commit 27880d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/statefulset/stateful_set_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func getParentName(pod *v1.Pod) string {
return parent
}

// getOrdinal gets pod's ordinal. If pod has no ordinal, -1 is returned.
// getOrdinal gets pod's ordinal. If pod has no ordinal, -1 is returned.
func getOrdinal(pod *v1.Pod) int {
_, ordinal := getParentNameAndOrdinal(pod)
return ordinal
Expand Down Expand Up @@ -687,5 +687,5 @@ func decreaseAndCheckMaxUnavailable(maxUnavailable *int) bool {
}
val := *maxUnavailable - 1
*maxUnavailable = val
return val <= 0
return val < 0
}

0 comments on commit 27880d1

Please sign in to comment.