Skip to content

Commit

Permalink
Fix volume size calculation if given as provider spec
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Dec 1, 2021
1 parent a7542d5 commit 080ea24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ionos/machine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (p *MachineProvider) CreateMachine(ctx context.Context, req *driver.CreateM
if 0 == volumeSize {
volumeSize = *image.Properties.Size
} else {
volumeSize = float32(math.Max(math.Ceil(float64(volumeSize) / 1048576), float64(*image.Properties.Size)))
volumeSize = float32(math.Max(math.Ceil(float64(volumeSize) / 1073741824), float64(*image.Properties.Size)))
}

volumeProperties := ionossdk.VolumeProperties{
Expand Down

0 comments on commit 080ea24

Please sign in to comment.