-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Volume Populator without the need for an additional PVC as source #1129
Comments
Unfortunately, I'm not sure this is possible, assuming I understand your use-case correctly. Essentially if you're using the VolumePopulator you cannot use this same PVC as the destinationPVC in your
At this point you can delete your If you are looking to simply do a 1 time replication (such as a restore from restic) then you could look into using copyMode: |
Thank you for the quick reply!
About removing the ReplicationDestination it seems that the dataSourceRef is an immutable field for PVC and I'm not sure if it could cause any issue if it refers to a non existing resource after it was provisioned kubernetes/kubernetes#119451 If it not possible to provision the PVC directly from the backup (e.g. the restic destination), I will look into using the one of restore. |
Would it be possible in this case if the destinationPVC of the ReplicationDestination is the same as the PVC with the volume populator to create a temporary PVC, restore the volume there, rebind the PV and drop the temporary PVC? |
You can remove the replication destination after your volume populator PVC has been populated. Once the PVC goes into bound state, volsync will not try to populate it again, essentially you can think of it as a one time operation.
I think this is getting overly complex - we might consider having some option to drop the temporary pvc after each replicationdestination sync cycle however? This does mean for repeated syncs to a destination with this option, a full copy of the data would need to be pulled down each time. |
The problem with this is that the destination PVC isn't immediately bound and has no And maybe, and I don't know if this isn't feasible for CSI reasons, we could allow |
Allowing the volumepopulator to work with copyMethod: Direct is an interesting idea, but I think not something we want to pursue at this point. Essentially if we rebind the direct destination PVC to a users' volume populator PVC, then we're breaking that original PVC. Using a snapshot gets around that problem, and also enables it to be a repeatable process (you can create another volume populator pvc pointing to the same replicationdestination and it should use the latest snapshot in your replicationdestination). |
Describe the feature you'd like to have.
When provisioning a PVC the
dataSourceRef
refers to aReplicationDestination
and if I try to configure theReplicationDestination
withdestinationPVC
pointing to the newly created PVC with thedataSourceRef
it will hang as both resource will depend on the other.Add an option where the
dataSourceRef
can provision the PVC without the need of an another PVC as a source (e.g. the one created by theReplicationDestination
).What is the value to the end user? (why is it a priority?)
When creating a PVC with a Volume Populator there would be no need to have an additional PVC in place as a source of the new one.
This can be troublesome for GitOps where the
ReplicationDestination
and PVC is committed to a git repository with thedataSourceRef
and because of this the PVC for theReplicationDestination
will remain in the cluster even though it's not needed after the PVC provisioning.How will we know we have a good solution? (acceptance criteria)
A PVC can be created and provisioned with a
dataSourceRef
without the need of additional PVC.Additional context
I'm not sure if my original idea to let the ReplicationDestination point to the PVC with the
dataSourceRef
could work.Something like this:
The text was updated successfully, but these errors were encountered: