mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 21:25:09 +00:00
Merge pull request #117943 from lowang-bh/lessFunCall
improve: reduce function calling number
This commit is contained in:
@@ -566,8 +566,9 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet(
|
||||
}
|
||||
|
||||
// for any empty indices in the sequence [0,set.Spec.Replicas) create a new Pod at the correct revision
|
||||
for ord := getStartOrdinal(set); ord <= getEndOrdinal(set); ord++ {
|
||||
replicaIdx := ord - getStartOrdinal(set)
|
||||
start, end := getStartOrdinal(set), getEndOrdinal(set)
|
||||
for ord := start; ord <= end; ord++ {
|
||||
replicaIdx := ord - start
|
||||
if replicas[replicaIdx] == nil {
|
||||
replicas[replicaIdx] = newVersionedStatefulSetPod(
|
||||
currentSet,
|
||||
|
Reference in New Issue
Block a user