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 5cec01d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## unreleased

* Return minimum disk size field from snapshot response
[[GH-298]](https://github.com/digitalocean/csi-digitalocean/pull/298)
* Improve debug HTTP server usage
[[GH-281]](https://github.com/digitalocean/csi-digitalocean/pull/281)

Expand Down
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 5cec01d

Please sign in to comment.