-
Notifications
You must be signed in to change notification settings - Fork 377
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
Relation between VolumeSnapshotContent and VolumeSnapshot should be 1:many #273
Comments
Would I ask because making the 1:N relationship would break the analog between VSContents/VS and PV/PVC, which makes the snapshot objects a little harder to reason about. Another suggestion may be to copy the Do you have a suggestion for what the updated YAML between the VSC and VS would look like in a 1:N mapping? |
This is what I imaging the
Every volumesnapshot object would add itself to the ref list. This will need some synchronization primitive to protect the ref list and out of band manipulation of the ref list, think editing the spec by hand, can lead to undesirable and unexpected behavior. |
The other thing you can do is to copy the VolumeSnapshotContent object, with the same snapshotHandle. If different VSCs have conflicting deletion policies, then one VSC could delete the handle underneath the others, but there's not a whole lot we can do about that. |
As discussed in today's Volume Snapshot WG meeting, there is a workaround. While the relationship between VolumeSnapshotContent to VolumeSnapshot is 1:1 mapping, we can create multiple VolumeSnapshotContents referencing the same snapshotHandle. We can have many 1:1 VolumeSnapshotContent to VolumeSnapshot mappings. @ashish-amarnath can this issue be closed as we have this workaround? |
Yes. closing this one. |
@ashish-amarnath: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@xing-yang @ashish-amarnath I don't think that workaround properly addresses the use case, and I think this should be re-opened. Conflicting deletion policies are a problem. If there were a 1:many mapping and a |
I have to agree with @benlangfeld, I also just stumbled across this issue. We plan to import many existing disk snapshots (in our cloud provider), into Kubernetes using the Sure, creating multiple Ideally, I would even go a step further and would like to be able to do something like this for the PVC:
The rights of my service account would ensure that I am allowed to access the snapshot storage. |
There's on-going design work for namespace transfer for resources such as PVCs and VolumeSnapshots. The following KEP will be updated for this work: |
@xing-yang Namespace transfer doesn't solve this use case either. |
So half a year later I "re-found" this issue when, as predicted by @nrb, I ran into an issue with one In our usecase we are adding new namespaces dynamically to which we provision existing snapshots using Our goal is to delete the snapshot on cloud provider side when the last referencing We can't simply set the In fact, we are likely to create a "global" VSC. It itself would not be bound to any EDIT While implementing this we realized that we now also need a "global" |
I found this issue when I was looking into how to import existing snapshots from AWS. If anyone is here for the same reason, the example is located here: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/tree/master/examples/kubernetes/snapshot/manifests/snapshot-import |
User Story
As a user of CSI volumesnapshot API, I would like to be able to use volumesnapshotcontents, with a non-nil
Source.snapshotHandle
, to provision new volumes pre-populated with data from the same snapshot in different namespaces in a kubernetes cluster.Detailed Description
For Volumesnapshots with a non-nil
.Spec.Source.SnapshotHandle
currently, it is only possible to create multiple PVCs, all in the same namespace, using a VolumeSnapshot as DataSource. This is due to the 1:1 relationship constraint between volumesnapshots and volumesnapshotcontents. This prevents users from replicating their workloads in the same cluster across different namespaces.Proposal
The relationship between volumesnapshotcontents to volumesnapshots should be 1 : many and the volumesnapshotcontents should be allowed to be referenced by multiple volumesnapshots across multiple namespaces.
cc @xing-yang
The text was updated successfully, but these errors were encountered: