From 1fd09d863722057a9dabb148061b448287da9d34 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Wed, 18 Nov 2020 09:00:15 +0530 Subject: [PATCH] e2e: set imagePullPolicy to ifNotPresent If the imagePullPolicy is not set and the image tag is empty or latest the image is always pulled. This commit sets the policy to pull image if not present. Signed-off-by: Madhu Rajanna (cherry picked from commit 8d86bac9b7edf6e979bd7064930b24ce9e853975) --- e2e/pod.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e/pod.go b/e2e/pod.go index c4a7e4b38..a179602d7 100644 --- a/e2e/pod.go +++ b/e2e/pod.go @@ -150,6 +150,9 @@ func loadApp(path string) (*v1.Pod, error) { if err != nil { return nil, err } + for i := range app.Spec.Containers { + app.Spec.Containers[i].ImagePullPolicy = v1.PullIfNotPresent + } return &app, nil }