mirror of https://github.com/kubernetes/kops.git
Set lifecycle on WarmPool task
This commit is contained in:
parent
26309f0016
commit
024b3653c0
|
@ -28,3 +28,7 @@ func (m *MockAutoscaling) DescribeWarmPool(input *autoscaling.DescribeWarmPoolIn
|
|||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (m *MockAutoscaling) DeleteWarmPool(*autoscaling.DeleteWarmPoolInput) (*autoscaling.DeleteWarmPoolOutput, error) {
|
||||
return &autoscaling.DeleteWarmPoolOutput{}, nil
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
enabled := fi.Bool(warmPool.IsEnabled())
|
||||
warmPoolTask := &awstasks.WarmPool{
|
||||
Name: &name,
|
||||
Lifecycle: b.Lifecycle,
|
||||
Enabled: enabled,
|
||||
}
|
||||
if warmPool.IsEnabled() {
|
||||
|
|
|
@ -60,12 +60,14 @@ func (e *WarmPool) Find(c *fi.Context) (*WarmPool, error) {
|
|||
if warmPool.WarmPoolConfiguration == nil {
|
||||
return &WarmPool{
|
||||
Name: e.Name,
|
||||
Lifecycle: e.Lifecycle,
|
||||
Enabled: fi.Bool(false),
|
||||
}, nil
|
||||
}
|
||||
|
||||
actual := &WarmPool{
|
||||
Name: e.Name,
|
||||
Lifecycle: e.Lifecycle,
|
||||
Enabled: fi.Bool(true),
|
||||
MaxSize: warmPool.WarmPoolConfiguration.MaxGroupPreparedCapacity,
|
||||
MinSize: fi.Int64Value(warmPool.WarmPoolConfiguration.MinSize),
|
||||
|
|
Loading…
Reference in New Issue