Skip to content

Commit

Permalink
fix bug minScale
Browse files Browse the repository at this point in the history
  • Loading branch information
xehrad committed Jun 10, 2020
1 parent fd01c4e commit 4d5e48f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func ApplicationCreate(appName, image, plan, EndpointType string, port, minScale
if err := endpointTypeValid(EndpointType); err != nil {
log.Panic(err)
}
if minScale == 0 {
minScale = 1
}
req := new(ybApi.AppCreateReq)
req.Name = appName
req.Plan = plan
Expand Down Expand Up @@ -150,7 +153,7 @@ func appUpdate(cmd *cobra.Command, args []string) {
req := new(ybApi.SrvConfigSetReq)
req.Name = getCliRequiredArg(args, 0)
req.Values = make(map[string]string)
if flagVarMinScale != 0 {
if flagVarMinScale > 0 {
req.Values["minimum-scale"] = fmt.Sprintf("%d", flagVarMinScale)
}
if flagVarPort != 0 {
Expand Down

0 comments on commit 4d5e48f

Please sign in to comment.