Skip to content

Commit 5eefef9

Browse files
committed
feat(charts): adding external docker_registry support
1 parent 20bb5e7 commit 5eefef9

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

charts/controller/templates/controller-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
serviceAccount: drycc-controller
2525
containers:
2626
- name: drycc-controller
27-
image: quay.io/{{.Values.org}}/controller:{{.Values.docker_tag}}
27+
image: {{.Values.docker_registry}}{{.Values.org}}/controller:{{.Values.docker_tag}}
2828
imagePullPolicy: {{.Values.pull_policy}}
2929
livenessProbe:
3030
httpGet:

charts/controller/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
org: "drycc"
22
pull_policy: "Always"
3-
docker_tag: canary
3+
docker_tag: "canary"
4+
docker_registry: ""
45
app_pull_policy: "Always"
56
# A comma-separated list of URLs to send app release information to
67
# See https://drycc.com/docs/workflow/managing-workflow/deploy-hooks

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)