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 <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-11-18 09:00:15 +05:30 committed by mergify[bot]
parent 8d3a44d0c4
commit 8d86bac9b7

View File

@ -156,6 +156,9 @@ func loadApp(path string) (*v1.Pod, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
for i := range app.Spec.Containers {
app.Spec.Containers[i].ImagePullPolicy = v1.PullIfNotPresent
}
return &app, nil return &app, nil
} }