-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
scale.go
28 lines (26 loc) · 1.19 KB
/
scale.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ecspresso
type ScaleOption struct {
DryRun bool `help:"dry run" default:"false"`
DesiredCount *int32 `name:"tasks" help:"desired count of tasks" default:"-1"`
Wait bool `help:"wait for service stable" default:"true" negatable:""`
SuspendAutoScaling *bool `help:"suspend application auto-scaling attached with the ECS service"`
ResumeAutoScaling *bool `help:"resume application auto-scaling attached with the ECS service"`
AutoScalingMin *int32 `help:"set minimum capacity of application auto-scaling attached with the ECS service"`
AutoScalingMax *int32 `help:"set maximum capacity of application auto-scaling attached with the ECS service"`
}
func (o *ScaleOption) DeployOption() DeployOption {
return DeployOption{
DesiredCount: o.DesiredCount,
DryRun: o.DryRun,
SkipTaskDefinition: true,
ForceNewDeployment: false,
Wait: o.Wait,
RollbackEvents: "",
UpdateService: false,
LatestTaskDefinition: false,
SuspendAutoScaling: o.SuspendAutoScaling,
ResumeAutoScaling: o.ResumeAutoScaling,
AutoScalingMin: o.AutoScalingMin,
AutoScalingMax: o.AutoScalingMax,
}
}