Closed jeremybusk closed 11 months ago
I'm going to close this as thinking about it I feel it is probably out of scope and best to not add in in order to keep simplicity of application. We can always reopen in the future if people feel it would be useful.
Hi @jeremybusk,
Thank you for the suggestion - I didn't get the chance to reply earlier. But you guessed it right, this was something I considered back then, but decided that it is out of scope. Reason is essentially, it doesn't bring any real value because kubernetes API is there so user can do (and automate) all kinds of things before and after the migration.
Besides that, creating PVCs are not trivial: the input is not only the storage class but also accessModes, size and CSI-specific additional values. It is impossible to cover all of those, and not meaningful to do so either.
But just for the record, it also felt like a good idea to me when it first occurred to me 🙂
First of all want to say this is an excellent project. Thank you! This request may be out of scope for the tool but it would be kind of convenient when scripting using pv-migrate to allow auto creation of destination pvc if it does not existing.
I would like pv-migrate to automatically create a destination pvc, use default storage class or allow passing of dst storage class via something like --create-dst-pvc-storage-class. You could auto clone src pvc settings, like size, and allow override of size settings.
It would error if dst-pvc already exists or if dst-storage-class didn't exist.
I can easily write my own bash, python or go wrapper to handle this but it might be nice to consider adding it into this tool for convenience as it should be fairly minimal code. It's possible this would add more risk of issues in pv-migrate and understand if left out due to scope but thought I'd add the issue just in case people found it useful.