Skip to content

Commit 81c13fb

Browse files
author
Timo Reimann
committed
Return minimum disk size field from snapshot response
We incorrectly returned the billable size of the snapshot instead of the minimum size. The latter represents the usable size the volume was created with and serves as a hint to Kubernetes for how big volumes created off of snapshots should be.
1 parent 690eca5 commit 81c13fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ func toCSISnapshot(snap *godo.Snapshot) (*csi.Snapshot, error) {
11081108
return &csi.Snapshot{
11091109
SnapshotId: snap.ID,
11101110
SourceVolumeId: snap.ResourceID,
1111-
SizeBytes: int64(snap.SizeGigaBytes) * giB,
1111+
SizeBytes: int64(snap.MinDiskSize) * giB,
11121112
CreationTime: tstamp,
11131113
ReadyToUse: true,
11141114
}, nil

0 commit comments

Comments
 (0)