Skip to content

Commit 26d3e7b

Browse files
committed
2 parents 1096826 + 5eefef9 commit 26d3e7b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rootfs/api/models/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,15 @@ def deploy(self, release, force_deploy=False, rollback_on_failure=True): # noqa
521521
image = settings.SLUGRUNNER_IMAGE if release.build.type == 'buildpack' else release.image
522522

523523
try:
524-
# check access to the image, so users can't exploit the k8s image cache
525-
# to gain access to other users' images
526-
release.check_image_access()
527524
# create the application config in k8s (secret in this case) for all deploy objects
528525
self.set_application_config(release)
529526
# only buildpack apps need access to object storage
527+
# only docker apps need check access to the image, so users can't exploit the k8s
528+
# image cache to gain access to other users' images
530529
if release.build.type == 'buildpack':
531530
self.create_object_store_secret()
531+
else:
532+
release.check_image_access()
532533

533534
# gather all proc types to be deployed
534535
tasks = [

0 commit comments

Comments
 (0)