Skip to content

Commit f87cc75

Browse files
author
Keerthan Mala
committed
fix(slugrunner): pass minio details to slugrunner for run command
1 parent 125d499 commit f87cc75

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

rootfs/scheduler/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
{
4444
"name": "BUILDER_STORAGE",
4545
"value":"$storagetype"
46+
},
47+
{
48+
"name": "DEIS_MINIO_SERVICE_HOST",
49+
"value":"$mHost"
50+
},
51+
{
52+
"name": "DEIS_MINIO_SERVICE_PORT",
53+
"value":"$mPort"
4654
}
4755
],
4856
"volumeMounts":[
@@ -488,10 +496,12 @@ def run(self, namespace, name, image, entrypoint, command, **kwargs):
488496
'storagetype': os.getenv("APP_STORAGE")
489497
}
490498

491-
if image.startswith('http://') or image.startswith('https://'):
499+
if entrypoint == '/runner/init':
492500
POD = POD_BTEMPLATE
493501
l["image"] = image
494502
l["slugimage"] = settings.SLUGRUNNER_IMAGE
503+
l["mHost"] = os.getenv("DEIS_MINIO_SERVICE_HOST")
504+
l["mPort"] = os.getenv("DEIS_MINIO_SERVICE_PORT")
495505

496506
template = json.loads(string.Template(POD).substitute(l))
497507

0 commit comments

Comments
 (0)