Skip to content

Commit 9f757f3

Browse files
committed
fix(scheduler): only update application service definition once
The problem here is that multiple process types will let the *last* process type win out. Instead let the first one win
1 parent f9e4767 commit 9f757f3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

rootfs/scheduler/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@
245245
],
246246
"selector": {
247247
"app": "$name",
248-
"type": "web",
249248
"heritage": "deis"
250249
}
251250
}
@@ -333,11 +332,8 @@ def deploy(self, namespace, name, image, command, **kwargs):
333332
# see http://docs.deis.io/en/latest/using_deis/process-types/#web-vs-cmd-process-types
334333
service['metadata']['labels']['router.deis.io/routable'] = 'true'
335334

336-
# Set app type
337-
if (
338-
'type' not in service['spec']['selector'] or
339-
app_type != service['spec']['selector']['type']
340-
):
335+
# Set app type if there is not one available
336+
if 'type' not in service['spec']['selector']:
341337
service['spec']['selector']['type'] = app_type
342338

343339
# Find if target port exists already, which it also may not

0 commit comments

Comments
 (0)