Skip to content

Commit

Permalink
Merge pull request deis#802 from helgi/fix_deploy
Browse files Browse the repository at this point in the history
fix(scheduler): make deploy have 0 replicas by default and then use scaling to go up
  • Loading branch information
helgi committed Jun 8, 2016
2 parents 7e7715b + 3fa6f70 commit b7a4582
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rootfs/scheduler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ def deploy(self, namespace, name, image, command, **kwargs): # noqa
logger.info('RC {} already exists under Namespace {}. Stopping deploy'.format(name, namespace)) # noqa
return
except KubeHTTPException:
new_rc = self._create_rc(namespace, name, image, command, **kwargs).json()
# make replicas 0 so scaling handles the work
replicas = kwargs.pop('replicas')
new_rc = self._create_rc(namespace, name, image, command, replicas=0, **kwargs).json()
kwargs['replicas'] = replicas

# Get the desired number to scale to
if old_rc:
Expand Down

0 comments on commit b7a4582

Please sign in to comment.