Skip to content

Commit 81371d5

Browse files
author
Gabriel Monroy
committed
fix(cmd): only allow the router to scale past 1
1 parent 5363a94 commit 81371d5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Done.
8181

8282
Note that the default install command activates 1 of each component.
8383
You can scale components with `deisctl scale router=3`, for example.
84+
The router is the only component that _currently_ scales beyond 1 unit.
8485

8586
You can also use the `deisctl uninstall` command to destroy platform units:
8687

cmd/cmd.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ func Scale(b backend.Backend, targets []string) error {
4747
if err != nil {
4848
return err
4949
}
50-
err = b.Scale(component, num)
51-
if err != nil {
50+
// the router is the only component that can scale past 1 at the moment
51+
if num > 1 && !strings.Contains(component, "router") {
52+
return fmt.Errorf("cannot scale %s past 1", component)
53+
}
54+
if err := b.Scale(component, num); err != nil {
5255
return err
5356
}
5457
}

0 commit comments

Comments
 (0)