Skip to content

Commit

Permalink
Merge pull request #20220 from bennett-white/pullpolicy
Browse files Browse the repository at this point in the history
Set imagePullPolicy

(cherry picked from commit 565e20e)
  • Loading branch information
carbonin authored and simaishi committed May 28, 2020
1 parent 80e1e6f commit faa1746
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/miq_worker/container_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def configure_worker_deployment(definition, replicas = 0)
end

container = definition[:spec][:template][:spec][:containers].first

if container_image_tag.include?("latest")
container[:imagePullPolicy] = "Always"
end

container[:image] = "#{container_image_namespace}/#{container_image_name}:#{container_image_tag}"
container[:env] << {:name => "WORKER_CLASS_NAME", :value => self.class.name}
container[:env] << {:name => "BUNDLER_GROUPS", :value => self.class.bundler_groups.join(",")}
Expand Down

0 comments on commit faa1746

Please sign in to comment.