diff options
| author | KubeEdge Bot <48982446+kubeedge-bot@users.noreply.github.com> | 2024-03-26 20:21:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-26 20:21:28 +0800 |
| commit | f3860961aedfcd1e2510fe2b6f7f4200800b03cb (patch) | |
| tree | df102e4761d103caa174ca262db4d18dff731e26 | |
| parent | Merge pull request #5487 from Shelley-BaoYue/automated-cherry-pick-of-#5485-u... (diff) | |
| parent | fix retrytimes in imageprepulljob (diff) | |
| download | kubeedge-f3860961aedfcd1e2510fe2b6f7f4200800b03cb.tar.gz | |
Merge pull request #5491 from Shelley-BaoYue/automated-cherry-pick-of-#5484-upstream-release-1.16
Automated cherry pick of #5484: fix retrytimes in imageprepulljob
| -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 |
