Skip to content
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

Allow cross-namespace restore of CSI snapshots #2143

Closed
nrb opened this issue Dec 16, 2019 · 10 comments
Closed

Allow cross-namespace restore of CSI snapshots #2143

nrb opened this issue Dec 16, 2019 · 10 comments
Assignees
Labels
Area/CSI Related to Container Storage Interface support
Milestone

Comments

@nrb
Copy link
Contributor

nrb commented Dec 16, 2019

PR #1779 allowed users to restore a snapshot into a different namespace if they were remapping that namespace during a restore.

In order to maintain feature parity, Velero's CSI support should allow users to do the same.

This will likely entail cloning at least the associated VolumeSnapshot, and maybe copying the VolumeSnapshotContent object, as these two are often in a 1:1 relationship and the VolumeSnapshotContent object is what holds the snapshotHandle reference.

@nrb nrb added P2 - Long-term important Area/CSI Related to Container Storage Interface support labels Dec 16, 2019
@nrb nrb added this to the v1.3 milestone Dec 16, 2019
@nrb
Copy link
Contributor Author

nrb commented Dec 16, 2019

Note that native CSI support for this is planned, but I do not know where it is in the roadmap yet.

@nrb
Copy link
Contributor Author

nrb commented Dec 19, 2019

kubernetes/enhancements#643 is the upstream KEP, and is currently planned for design (but not implementation) during the v1.18 cycle

Whoops: kubernetes/enhancements#1112 is the most up-to-date KEP, 643 was closed.

@skriss skriss modified the milestones: v1.3, v1.4 Feb 4, 2020
@ashish-amarnath
Copy link
Member

@nrb
Copy link
Contributor Author

nrb commented Mar 10, 2020

Don't forget KEP 1112 - that may be more relevant.

@nrb
Copy link
Contributor Author

nrb commented Apr 10, 2020

I think we should look at moving this out of v1.4's beta and into v1.5. Thoughts @ashish-amarnath and @skriss?

@skriss
Copy link
Contributor

skriss commented Apr 15, 2020

I'm fine with considering it non-release-blocking, yeah.

@ashish-amarnath
Copy link
Member

From the outset, it seems like a simple change to address this. Need to check some of my assumptions though. I am OK w/ moving this out of 1.4.

@skriss skriss removed this from the v1.4 milestone Apr 27, 2020
@ashish-amarnath ashish-amarnath added this to the v1.5 milestone Jun 1, 2020
@nrb nrb modified the milestones: v1.5, v1.6 Aug 11, 2020
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Nov 12, 2020
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Nov 12, 2020
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Dec 10, 2020
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Dec 10, 2020
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to sshende-catalogicsoftware/velero-plugin-for-csi that referenced this issue Dec 10, 2020
- Check for namespace mapping information.
- If there is a valid mapping found, then, replace the original namespace in VolumeSnapshot and PVC Objects to the mapped namespace before restoring
- Fixes PR 2143(vmware-tanzu/velero#2143)

Signed-off-by: Swanand Shende <[email protected]>
@sshende-catalogicsoftware

Submitted a PR for review: vmware-tanzu/velero-plugin-for-csi#82
It is a very small change.

@arianitu
Copy link

Following up on this, we originally pushed the namespace remapping feature for in-tree volumes and want to help with getting the CSI one in as well. The namespace remapping feature on the original did lead to some security issues, so I can help review remapping behaviour in the CSI plugin as well.

Are there any blockers on this or need assistance? Is the PR from @sshende-catalogicsoftware a valid fix?

@nrb nrb modified the milestones: v1.6.0, v1.7.0 Feb 3, 2021
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Mar 16, 2021
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
@ashish-amarnath
Copy link
Member

This has been fixed with vmware-tanzu/velero-plugin-for-csi#82
Closing this as done

sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Jul 20, 2021
* Allow cross-namespace restore of PVC's with CSI volumes

- Check for namespace mapping information.
- If there is a valid mapping found, then, replace the original namespace in VolumeSnapshot and PVC Objects to the mapped namespace before restoring
- Fixes PR 2143(vmware-tanzu/velero#2143)

Signed-off-by: Swanand Shende <[email protected]>

* Only publish the container image from the root repo

Signed-off-by: JenTing Hsiao <[email protected]>

* Add jenting as reviewer (vmware-tanzu#83)

* add changelog for PR 82

Signed-off-by: Ashish Amarnath <[email protected]>

* ✨ ⚠️ DeleteItemAction for volumesnapshots and volumesnapshotcontents

This change is incompatible with velero release
> v1.4 and <=v1.6

Signed-off-by: Ashish Amarnath <[email protected]>

* Update auto assign of reviewers

Signed-off-by: Carlisia <[email protected]>

* remove ashish-amarnath from maintainers

Signed-off-by: Ashish Amarnath <[email protected]>

* Only remove annotations related to PV binding (vmware-tanzu#89)

PVCs can have any number annotations used for any purposes. Removing
them all can brake clients' workflows.

This commit changes the removal to only remove the annotations that are
used by K8s itself to manage PVC-PV binding. All other annotations are
left intact.

Signed-off-by: Tomasz Baranski <[email protected]>

* Fix compilation errors

Co-authored-by: JenTing Hsiao <[email protected]>
Co-authored-by: Bridget McErlean <[email protected]>
Co-authored-by: Ashish Amarnath <[email protected]>
Co-authored-by: David L. Smith-Uchida <[email protected]>
Co-authored-by: Carlisia Thompson <[email protected]>
Co-authored-by: Carlisia <[email protected]>
Co-authored-by: Scott Seago <[email protected]>
Co-authored-by: Tomasz Barański <[email protected]>
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Sep 20, 2022
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Oct 3, 2022
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
sshende-catalogicsoftware added a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Oct 3, 2022
- Check for namespace mapping information.
- If there is a map, replace VolumeSnapshots namespace to the target namespace

Fixes KUBEDR-364 and KUBEDR-406

Fixes Issues these similar issues from Velero:
1. vmware-tanzu/velero#2143
2. https://github.com/vmware-tanzu/velero-plugin-for-csi/issues/75
kkothule pushed a commit to catalogicsoftware/velero-plugin-for-csi that referenced this issue Jul 28, 2023
- Check for namespace mapping information.
- If there is a valid mapping found, then, replace the original namespace in VolumeSnapshot and PVC Objects to the mapped namespace before restoring
- Fixes PR 2143(vmware-tanzu/velero#2143)

Signed-off-by: Swanand Shende <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CSI Related to Container Storage Interface support
Projects
None yet
Development

No branches or pull requests

5 participants