Skip to content

Commit 54907a0

Browse files
authored
E2E support sets the --item-block-worker-count. (#8836)
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
1 parent 16023c1 commit 54907a0

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

test/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ FEATURES ?=
116116
DEBUG_VELERO_POD_RESTART ?= false
117117
VELERO_SERVER_DEBUG_MODE ?= false
118118

119+
ITEM_BLOCK_WORKER_COUNT ?= 1
120+
119121
# Parameters to run migration tests along with all other E2E tests, and both of them should
120122
# be provided or left them all empty to skip migration tests with no influence to other
121123
# E2E tests.
@@ -167,7 +169,8 @@ COMMON_ARGS := --velerocli=$(VELERO_CLI) \
167169
--uploader-type=$(UPLOADER_TYPE) \
168170
--debug-velero-pod-restart=$(DEBUG_VELERO_POD_RESTART) \
169171
--fail-fast=$(FAIL_FAST) \
170-
--has-vsphere-plugin=$(HAS_VSPHERE_PLUGIN)
172+
--has-vsphere-plugin=$(HAS_VSPHERE_PLUGIN) \
173+
--item-block-worker-count=$(ITEM_BLOCK_WORKER_COUNT)
171174

172175
# Make sure ginkgo is in $GOBIN
173176
.PHONY:ginkgo

test/e2e/e2e_suite_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,12 @@ func init() {
343343
false,
344344
"a switch for installing vSphere plugin.",
345345
)
346+
flag.IntVar(
347+
&test.VeleroCfg.ItemBlockWorkerCount,
348+
"item-block-worker-count",
349+
1,
350+
"Velero backup's item block worker count.",
351+
)
346352
}
347353

348354
// Add label [SkipVanillaZfs]:

test/util/velero/install.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ func installVeleroServer(ctx context.Context, cli, cloudProvider string, options
367367
args = append(args, fmt.Sprintf("--uploader-type=%v", options.UploaderType))
368368
}
369369

370+
if options.ItemBlockWorkerCount > 1 {
371+
args = append(args, fmt.Sprintf("--item-block-worker-count=%d", options.ItemBlockWorkerCount))
372+
}
373+
370374
if err := createVeleroResources(ctx, cli, namespace, args, options); err != nil {
371375
return err
372376
}

test/util/velero/velero_utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ func getProviderVeleroInstallOptions(veleroCfg *VeleroConfig,
280280
io.VeleroPodMemLimit = veleroCfg.VeleroPodMemLimit
281281
io.VeleroPodMemRequest = veleroCfg.VeleroPodMemRequest
282282
io.DisableInformerCache = veleroCfg.DisableInformerCache
283+
io.ItemBlockWorkerCount = veleroCfg.ItemBlockWorkerCount
283284

284285
return io, nil
285286
}

0 commit comments

Comments
 (0)