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>
(cherry picked from commit 8d86bac9b7)
This commit is contained in:
Madhu Rajanna 2020-11-18 09:00:15 +05:30 committed by mergify[bot]
parent 19204ea371
commit 1fd09d8637

View File

@ -150,6 +150,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
} }