Skip to content

Commit e1c6e71

Browse files
authored
Merge pull request #1025 from kmala/fix
fix(imagepullpolicy): Use correct environment variable for image pull policy
2 parents 1ca970b + 7f16439 commit e1c6e71

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@
254254

255255
# k8s image policies
256256
SLUGRUNNER_IMAGE = os.environ.get('SLUGRUNNER_IMAGE_NAME', 'quay.io/deisci/slugrunner:canary') # noqa
257-
SLUG_BUILDER_IMAGE_PULL_POLICY = os.environ.get('SLUG_BUILDER_IMAGE_PULL_POLICY', "Always") # noqa
258-
DOCKER_BUILDER_IMAGE_PULL_POLICY = os.environ.get('DOCKER_BUILDER_IMAGE_PULL_POLICY', "Always") # noqa
257+
SLUG_RUNNER_IMAGE_PULL_POLICY = os.environ.get('SLUG_RUNNER_IMAGE_PULL_POLICY', "IfNotPresent") # noqa
258+
IMAGE_PULL_POLICY = os.environ.get('IMAGE_PULL_POLICY', "IfNotPresent") # noqa
259259

260260
# Define a global default on how many pods to bring up and then
261261
# take down sequentially during a deploy

rootfs/scheduler/resources/pod.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def manifest(self, namespace, name, image, **kwargs):
111111
spec['terminationGracePeriodSeconds'] = kwargs.get('pod_termination_grace_period_seconds', 30) # noqa
112112

113113
# set the image pull policy that is associated with the application container
114-
kwargs['image_pull_policy'] = settings.DOCKER_BUILDER_IMAGE_PULL_POLICY
114+
kwargs['image_pull_policy'] = settings.IMAGE_PULL_POLICY
115115

116116
# Check if it is a slug builder image.
117117
if build_type == "buildpack":
@@ -140,7 +140,7 @@ def manifest(self, namespace, name, image, **kwargs):
140140
# overwrite image so slugrunner image is used in the container
141141
image = settings.SLUGRUNNER_IMAGE
142142
# slugrunner pull policy
143-
kwargs['image_pull_policy'] = settings.SLUG_BUILDER_IMAGE_PULL_POLICY
143+
kwargs['image_pull_policy'] = settings.SLUG_RUNNER_IMAGE_PULL_POLICY
144144

145145
# create the base container
146146
container = {}

0 commit comments

Comments
 (0)