mirror of https://github.com/kubernetes/kops.git
feat(spot): Setting the VNG Size Limits in Launch Spec
This commit is contained in:
parent
f7fe2bc155
commit
222e138683
|
|
@ -546,13 +546,16 @@ func (b *SpotInstanceGroupModelBuilder) buildLaunchSpec(c *fi.CloudupModelBuilde
|
|||
// Capacity.
|
||||
minSize, maxSize := b.buildCapacity(ig)
|
||||
if fi.ValueOf(ocean.UseAsTemplateOnly) {
|
||||
launchSpec.MinSize = minSize
|
||||
launchSpec.MaxSize = maxSize
|
||||
ocean.MinSize = minSize
|
||||
ocean.MaxSize = maxSize
|
||||
} else {
|
||||
ocean.MinSize = fi.PtrTo(fi.ValueOf(ocean.MinSize) + fi.ValueOf(minSize))
|
||||
ocean.MaxSize = fi.PtrTo(fi.ValueOf(ocean.MaxSize) + fi.ValueOf(maxSize))
|
||||
}
|
||||
|
||||
launchSpec.MinSize = minSize
|
||||
launchSpec.MaxSize = maxSize
|
||||
|
||||
// User data.
|
||||
if ig.Name == igOcean.Name && !featureflag.SpotinstOceanTemplate.Enabled() {
|
||||
launchSpec.UserData = ocean.UserData
|
||||
|
|
|
|||
Loading…
Reference in New Issue