mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
improve: reduce function calling number
Signed-off-by: lowang_bh <lhui_wang@163.com>
This commit is contained in:
@@ -348,8 +348,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