@@ -382,21 +382,31 @@ func (rn Runner) deployment(args ...string) error {
382382 resp , err = s .Delete (context .Background (), & req )
383383 case "deploy" :
384384 var (
385- req api.DeploymentDeploy
386- typ string
387- port int
385+ req api.DeploymentDeploy
386+ typ string
387+ port int
388+ minReplicas int
389+ maxReplicas int
388390 )
389391 f .StringVar (& req .Location , "location" , "" , "location" )
390392 f .StringVar (& req .Project , "project" , "" , "project id" )
391393 f .StringVar (& req .Name , "name" , "" , "deployment name" )
392394 f .StringVar (& req .Image , "image" , "" , "docker image" )
393395 f .StringVar (& typ , "type" , "" , "deployment type" )
394396 f .IntVar (& port , "port" , 0 , "port" )
397+ f .IntVar (& minReplicas , "minReplicas" , 0 , "autoscale min replicas" )
398+ f .IntVar (& maxReplicas , "maxReplicas" , 0 , "autoscale max replicas" )
395399 f .Parse (args [1 :])
396400 req .Type = api .ParseDeploymentTypeString (typ )
397401 if port > 0 {
398402 req .Port = & port
399403 }
404+ if minReplicas > 0 {
405+ req .MinReplicas = & minReplicas
406+ }
407+ if maxReplicas > 0 {
408+ req .MaxReplicas = & maxReplicas
409+ }
400410 resp , err = s .Deploy (context .Background (), & req )
401411 case "set" :
402412 return rn .deploymentSet (args [1 :]... )
0 commit comments