backube / volsync

Asynchronous data replication for Kubernetes volumes
https://volsync.readthedocs.io
GNU Affero General Public License v3.0
587 stars 68 forks source link

When allocating a new volume based on another, use the correct capacity #48

Closed JohnStrunk closed 2 years ago

JohnStrunk commented 3 years ago

When generating a clone of an existing PVC, we currently use the requested size: https://github.com/backube/volsync/blob/216ac45a8ac7ae851d7a1713fec16a0a8a7cd459/controllers/volumehandler/volumehandler.go#L243 https://github.com/backube/volsync/blob/216ac45a8ac7ae851d7a1713fec16a0a8a7cd459/controllers/volumehandler/volumehandler.go#L346 https://github.com/backube/volsync/blob/216ac45a8ac7ae851d7a1713fec16a0a8a7cd459/controllers/volumehandler.go#L342 https://github.com/backube/volsync/blob/216ac45a8ac7ae851d7a1713fec16a0a8a7cd459/controllers/volumehandler.go#L430 We should be using the actual size (.status.capacity). These two could differ in the case of volume resize.

tesshuflower commented 3 years ago

/assign tesshuflower