mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +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 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++ {
|
start, end := getStartOrdinal(set), getEndOrdinal(set)
|
||||||
replicaIdx := ord - getStartOrdinal(set)
|
for ord := start; ord <= end; ord++ {
|
||||||
|
replicaIdx := ord - start
|
||||||
if replicas[replicaIdx] == nil {
|
if replicas[replicaIdx] == nil {
|
||||||
replicas[replicaIdx] = newVersionedStatefulSetPod(
|
replicas[replicaIdx] = newVersionedStatefulSetPod(
|
||||||
currentSet,
|
currentSet,
|
||||||
|
Reference in New Issue
Block a user