mirror of https://github.com/kubernetes/kops.git
- fixing up the root device discovery
This commit is contained in:
parent
eff427937a
commit
bf69871a8b
|
|
@ -183,16 +183,16 @@ func (e *LaunchConfiguration) Find(c *fi.Context) (*LaunchConfiguration, error)
|
||||||
actual.SecurityGroups = securityGroups
|
actual.SecurityGroups = securityGroups
|
||||||
|
|
||||||
// Find the root volume
|
// Find the root volume
|
||||||
for _, b := range lc.BlockDeviceMappings {
|
for i, b := range lc.BlockDeviceMappings {
|
||||||
if b.Ebs == nil {
|
if b.Ebs == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// @TODO check if this still work, i.e. will it be the only volume without a snapshot??
|
switch i {
|
||||||
if b.Ebs.SnapshotId != nil {
|
case 0:
|
||||||
actual.RootVolumeSize = b.Ebs.VolumeSize
|
actual.RootVolumeSize = b.Ebs.VolumeSize
|
||||||
actual.RootVolumeType = b.Ebs.VolumeType
|
actual.RootVolumeType = b.Ebs.VolumeType
|
||||||
actual.RootVolumeIops = b.Ebs.Iops
|
actual.RootVolumeIops = b.Ebs.Iops
|
||||||
} else {
|
default:
|
||||||
_, d := BlockDeviceMappingFromAutoscaling(b)
|
_, d := BlockDeviceMappingFromAutoscaling(b)
|
||||||
actual.BlockDeviceMappings = append(actual.BlockDeviceMappings, d)
|
actual.BlockDeviceMappings = append(actual.BlockDeviceMappings, d)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue