From 8d86bac9b7edf6e979bd7064930b24ce9e853975 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 --- e2e/pod.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e/pod.go b/e2e/pod.go index bec7151e9..c4e0e0718 100644 --- a/e2e/pod.go +++ b/e2e/pod.go @@ -156,6 +156,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 }