Skip to content

Commit

Permalink
Don't rely on the default value for ImagePullPolicy
Browse files Browse the repository at this point in the history
Now we will set the pull policy to always if the tag matche .*latest.*
and also explicitly set it to IfNotPresent otherwise.
  • Loading branch information
carbonin committed Jun 16, 2020
1 parent 4701b11 commit f87ce5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/miq_worker/container_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit f87ce5a

Please sign in to comment.