Skip to content

Commit 51b8fe1

Browse files
authored
Merge pull request #90 from duanhongyi/master
fix(controller): check_image_access only when using docker
2 parents c86f61f + b3a741d commit 51b8fe1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rootfs/api/models/app.py

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

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

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

0 commit comments

Comments
 (0)