rancher / rio

Application Deployment Engine for Kubernetes
https://rio.io
Apache License 2.0
2.27k stars 228 forks source link

scale: 1-10 in riofile break the configuration #1050

Closed ticruz38 closed 4 years ago

ticruz38 commented 4 years ago

Describe the bug

using a range for the scale property break the riofile.

To Reproduce

In riofile, use scale: 1-10, output below error with rio up: => json: cannot unmarshal string into Go struct field ServiceSpec.services.spec.replicas of type int

Kubernetes version & type (GKE, on-prem): kubectl version

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-21T14:51:23Z", GoVersion:"go1.14.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.6", GitCommit:"d32e40e20d167e103faf894261614c5b45c44198", GitTreeState:"clean", BuildDate:"2020-05-20T13:08:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Type: Rio version: rio info


Rio Version: v0.7.1 (d4c5f274)
Rio CLI Version: v0.7.1 (d4c5f274)
mbarlow commented 4 years ago

@ticruz38 the scale attribute in riofile only sets the starting value. To define the range use the autoscale definition:

    autoscale:
      concurrency: 10 # specify concurrent request each pod can handle(soft limit, used to scale service)
      maxReplicas: 10
      minReplicas: 1

Docs for riofile are here: https://github.com/rancher/rio/blob/master/docs/riofile.md

ticruz38 commented 4 years ago

alright, I didn't check the last docs, thanks!