summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/crd-samples/operations/imageprepulljob.yaml4
-rw-r--r--edge/pkg/edgehub/task/taskexecutor/image_prepull.go2
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