diff options
| author | Shelley-BaoYue <baoyue2@huawei.com> | 2024-03-25 15:44:19 +0800 |
|---|---|---|
| committer | Shelley-BaoYue <baoyue2@huawei.com> | 2024-03-26 19:41:16 +0800 |
| commit | c62855a70ac9cc2aaeb23481b8512c7b79eba6d6 (patch) | |
| tree | df102e4761d103caa174ca262db4d18dff731e26 | |
| parent | Merge pull request #5487 from Shelley-BaoYue/automated-cherry-pick-of-#5485-u... (diff) | |
| download | kubeedge-c62855a70ac9cc2aaeb23481b8512c7b79eba6d6.tar.gz | |
fix retrytimes in imageprepulljob
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
| -rw-r--r-- | build/crd-samples/operations/imageprepulljob.yaml | 4 | ||||
| -rw-r--r-- | edge/pkg/edgehub/task/taskexecutor/image_prepull.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/build/crd-samples/operations/imageprepulljob.yaml b/build/crd-samples/operations/imageprepulljob.yaml index 940a99975..041e83d26 100644 --- a/build/crd-samples/operations/imageprepulljob.yaml +++ b/build/crd-samples/operations/imageprepulljob.yaml @@ -10,5 +10,5 @@ spec: - busybox:latest nodes: - edgenode1 # Need to replaced with your own node name - timeoutSecondsOnEachNode: 300 - retryTimes: 1
\ No newline at end of file + timeoutSeconds: 300 + retryTimes: 1 diff --git a/edge/pkg/edgehub/task/taskexecutor/image_prepull.go b/edge/pkg/edgehub/task/taskexecutor/image_prepull.go index a2b19c8e7..86da16e6b 100644 --- a/edge/pkg/edgehub/task/taskexecutor/image_prepull.go +++ b/edge/pkg/edgehub/task/taskexecutor/image_prepull.go @@ -137,7 +137,7 @@ func prePullImages(prePullReq commontypes.ImagePrePullJobRequest, container util prePullStatus := v1alpha1.ImageStatus{ Image: image, } - for i := 0; i < int(prePullReq.RetryTimes); i++ { + for i := 0; i <= int(prePullReq.RetryTimes); i++ { err = container.PullImage(image, authConfig, nil) if err == nil { break |
