Closed MurzNN closed 5 months ago
It is a good idea, but I think it's out of scope for this tool. I don't aim to increase the functionality to do more things - rather keep it focused to copying the data.
What you suggest should be doable with a small wrapper, e.g. a bash script, which calls pv-migrate + does what you suggest. Another option would be to create a new cli tool, import this project and use its internals.
Closing as it is out-of-scope for simplicity.
Is your feature request related to a problem? Please describe. Kubernetes doesn't have the functionality to reduce or shrink the PV size.
But we can automate this process and make this feature work via several steps!
We can create a new empty PV with the reduced size, rsync the data to it, and then - replace the old PV to the new one in the PVC.
Describe the solution you'd like So, here are the steps of how to implement this:
Describe alternatives you've considered I searched a lot for a ready-to-use tool for this task but found nothing. :(
So, implementing this in the
pv-migrate
will be a great improvement!