Skip to content

Commit

Permalink
Fix: checking available image size for block volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Oct 14, 2024
1 parent 7b330eb commit c90ef04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/importer/data-processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ func (dp *DataProcessor) calculateTargetSize() int64 {
klog.Error(err)
}
targetQuantity = resource.NewScaledQuantity(size, 0)
}
if dp.requestImageSize != "" {
klog.V(1).Infof("Request image size not empty.\n")
newImageSizeQuantity := resource.MustParse(dp.requestImageSize)
minQuantity := util.MinQuantity(targetQuantity, &newImageSizeQuantity)
targetQuantity = &minQuantity
if dp.requestImageSize != "" {
klog.V(1).Infof("Request image size not empty.\n")
newImageSizeQuantity := resource.MustParse(dp.requestImageSize)
minQuantity := util.MinQuantity(targetQuantity, &newImageSizeQuantity)
targetQuantity = &minQuantity
}
}
klog.V(1).Infof("Target size %s.\n", targetQuantity.String())
targetSize := targetQuantity.Value()
Expand Down

0 comments on commit c90ef04

Please sign in to comment.