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
|
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())
|
enabled := fi.Bool(warmPool.IsEnabled())
|
||||||
warmPoolTask := &awstasks.WarmPool{
|
warmPoolTask := &awstasks.WarmPool{
|
||||||
Name: &name,
|
Name: &name,
|
||||||
|
Lifecycle: b.Lifecycle,
|
||||||
Enabled: enabled,
|
Enabled: enabled,
|
||||||
}
|
}
|
||||||
if warmPool.IsEnabled() {
|
if warmPool.IsEnabled() {
|
||||||
|
|
|
@ -60,12 +60,14 @@ func (e *WarmPool) Find(c *fi.Context) (*WarmPool, error) {
|
||||||
if warmPool.WarmPoolConfiguration == nil {
|
if warmPool.WarmPoolConfiguration == nil {
|
||||||
return &WarmPool{
|
return &WarmPool{
|
||||||
Name: e.Name,
|
Name: e.Name,
|
||||||
|
Lifecycle: e.Lifecycle,
|
||||||
Enabled: fi.Bool(false),
|
Enabled: fi.Bool(false),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
actual := &WarmPool{
|
actual := &WarmPool{
|
||||||
Name: e.Name,
|
Name: e.Name,
|
||||||
|
Lifecycle: e.Lifecycle,
|
||||||
Enabled: fi.Bool(true),
|
Enabled: fi.Bool(true),
|
||||||
MaxSize: warmPool.WarmPoolConfiguration.MaxGroupPreparedCapacity,
|
MaxSize: warmPool.WarmPoolConfiguration.MaxGroupPreparedCapacity,
|
||||||
MinSize: fi.Int64Value(warmPool.WarmPoolConfiguration.MinSize),
|
MinSize: fi.Int64Value(warmPool.WarmPoolConfiguration.MinSize),
|
||||||
|
|
Loading…
Reference in New Issue