130130 {
131131 "name": "$containername",
132132 "image": "$image",
133+ "imagePullPolicy": "$image_pull_policy",
133134 "env": [
134135 {
135136 "name":"DEIS_APP",
184185 {
185186 "name": "$containername",
186187 "image": "$slugimage",
187- "imagePullPolicy": "Always ",
188+ "imagePullPolicy": "$image_pull_policy ",
188189 "env": [
189190 {
190191 "name":"PORT",
@@ -495,12 +496,14 @@ def run(self, namespace, name, image, entrypoint, command, **kwargs):
495496 'id' : name ,
496497 'version' : self .apiversion ,
497498 'image' : imgurl ,
499+ 'image_pull_policy' : settings .DOCKER_BUILDER_IMAGE_PULL_POLICY ,
498500 'storagetype' : os .getenv ("APP_STORAGE" )
499501 }
500502
501503 if entrypoint == '/runner/init' :
502504 POD = POD_BTEMPLATE
503505 l ["image" ] = image
506+ l ['image_pull_policy' ] = settings .SLUG_BUILDER_IMAGE_PULL_POLICY
504507 l ["slugimage" ] = settings .SLUGRUNNER_IMAGE
505508 l ["mHost" ] = os .getenv ("DEIS_MINIO_SERVICE_HOST" )
506509 l ["mPort" ] = os .getenv ("DEIS_MINIO_SERVICE_PORT" )
@@ -876,6 +879,7 @@ def _create_rc(self, namespace, name, image, command, **kwargs): # noqa
876879 "appversion" : kwargs .get ("version" ),
877880 "version" : self .apiversion ,
878881 "image" : imgurl ,
882+ 'image_pull_policy' : settings .DOCKER_BUILDER_IMAGE_PULL_POLICY ,
879883 "replicas" : kwargs .get ("replicas" , 0 ),
880884 "containername" : container_name ,
881885 "type" : app_type ,
@@ -887,6 +891,7 @@ def _create_rc(self, namespace, name, image, command, **kwargs): # noqa
887891 # Check if it is a slug builder image.
888892 if kwargs .get ('build_type' ) == "buildpack" :
889893 l ["image" ] = image
894+ l ['image_pull_policy' ] = settings .SLUG_BUILDER_IMAGE_PULL_POLICY
890895 l ["slugimage" ] = settings .SLUGRUNNER_IMAGE
891896 TEMPLATE = RCB_TEMPLATE
892897
0 commit comments