Skip to content

Commit

Permalink
Return minimum disk size field from snapshot response
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Timo Reimann committed Apr 7, 2020
1 parent 690eca5 commit 81c13fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ func toCSISnapshot(snap *godo.Snapshot) (*csi.Snapshot, error) {
return &csi.Snapshot{
SnapshotId: snap.ID,
SourceVolumeId: snap.ResourceID,
SizeBytes: int64(snap.SizeGigaBytes) * giB,
SizeBytes: int64(snap.MinDiskSize) * giB,
CreationTime: tstamp,
ReadyToUse: true,
}, nil
Expand Down

0 comments on commit 81c13fb

Please sign in to comment.