From f87ce5aab100d0169aa6ea058906c3fa5128099c Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Tue, 16 Jun 2020 09:03:47 -0400 Subject: [PATCH] Don't rely on the default value for ImagePullPolicy Now we will set the pull policy to always if the tag matche .*latest.* and also explicitly set it to IfNotPresent otherwise. --- app/models/miq_worker/container_common.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/miq_worker/container_common.rb b/app/models/miq_worker/container_common.rb index 3f716c2a710..6dc5293f31e 100644 --- a/app/models/miq_worker/container_common.rb +++ b/app/models/miq_worker/container_common.rb @@ -14,6 +14,8 @@ def configure_worker_deployment(definition, replicas = 0) if container_image_tag.include?("latest") container[:imagePullPolicy] = "Always" + else + container[:imagePullPolicy] = "IfNotPresent" end container[:image] = "#{container_image_namespace}/#{container_image_name}:#{container_image_tag}"