use build-in max and min func to instead of k8s.io/utils/integer funcs
This commit is contained in:
@@ -51,7 +51,6 @@ import (
|
||||
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
"k8s.io/kubernetes/pkg/controller/daemon/util"
|
||||
"k8s.io/utils/integer"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -999,8 +998,8 @@ func (dsc *DaemonSetsController) syncNodes(ctx context.Context, ds *apps.DaemonS
|
||||
// prevented from spamming the API service with the pod create requests
|
||||
// after one of its pods fails. Conveniently, this also prevents the
|
||||
// event spam that those failures would generate.
|
||||
batchSize := integer.IntMin(createDiff, controller.SlowStartInitialBatchSize)
|
||||
for pos := 0; createDiff > pos; batchSize, pos = integer.IntMin(2*batchSize, createDiff-(pos+batchSize)), pos+batchSize {
|
||||
batchSize := min(createDiff, controller.SlowStartInitialBatchSize)
|
||||
for pos := 0; createDiff > pos; batchSize, pos = min(2*batchSize, createDiff-(pos+batchSize)), pos+batchSize {
|
||||
errorCount := len(errCh)
|
||||
createWait.Add(batchSize)
|
||||
for i := pos; i < pos+batchSize; i++ {
|
||||
|
Reference in New Issue
Block a user