You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-storage/3476-volume-group-snapshot/README.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,10 +133,11 @@ Note: In the following, we will use VolumeGroupSnapshot Controller to refer to t
133
133
134
134
* Admin creates a VolumeGroupSnapshotClass.
135
135
* User creates a VolumeGroupSnapshot with label selector that matches the label applied to all PVCs to be snapshotted together.
136
-
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object, and also call the CreateVolumeGroupSnapshot CSI function.
137
-
* The controller will retrieve all volumeSnapshotHandles in the Volume Group Snapshot from the CSI CreateVolumeGroupSnapshotResponse, create VolumeSnapshotContents pointing to the volumeSnapshotHandles. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
136
+
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object. The group snapshot logic in the csi-snapshotter sidecar will call the CreateVolumeGroupSnapshot CSI function.
137
+
* The group snapshot logic in csi-snapshotter will retrieve all volumeSnapshotHandles and their source volumeHandles in the Volume Group Snapshot from the CSI CreateVolumeGroupSnapshotResponse, and populate the VolumeSnapshotHandlePairList field in the VolumeGroupSnapshotContent status.
138
+
* The VolumeGroupSnapshot controller will be watching the VolumeGroupSnapshotContent, and create VolumeSnapshotContents pointing to the volumeSnapshotHandles once they are available in the VolumeGroupSnapshotContent status. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
138
139
* CreateVolumeGroupSnapshot CSI function response
139
-
* The CreateVolumeGroupSnapshot CSI function should return a list of snapshots (Snapshot message defined in CSI Spec) in its response. The VolumeGroupSnapshot controller can use the returned list of snapshots to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound, and update SnapshotRefList in the VolumeGroupSnapshot Status and SnapshotContentList in the VolumeGroupSnapshotContent Status.
140
+
* The CreateVolumeGroupSnapshot CSI function should return a list of snapshots (Snapshot message defined in CSI Spec) in its response. The group snapshot logic in the csi-snapshotter sidecar will update the VolumeSnapshotHandlePairList field in the VolumeGroupSnapshotContent status based on the returned list of snapshots from the CSI call. The VolumeGroupSnapshot controller can use VolumeSnapshotHandles to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound, and update PVCVolumeSnapshotRefList in the VolumeGroupSnapshot Status and PVVolumeSnapshotContentList in the VolumeGroupSnapshotContent Status.
140
141
* Individual VolumeSnapshots will be named in this format:
141
142
* <snap>-<hash of VolumeGroupSnapshot UUID+PVC UUID+timestamp>
142
143
* A label with VolumeGroupSnapshot name will also be added to the VolumeSnapshot
@@ -463,6 +464,17 @@ type GroupSnapshotHandles struct {
463
464
VolumeSnapshotHandles []string
464
465
}
465
466
467
+
// VolumeSnapshotHandlePair defines a pair of a source volume handle and a snapshot handle
468
+
type VolumeSnapshotHandlePair struct {
469
+
// VolumeHandle is a unique id returned by the CSI driver to identify a volume
470
+
// on the storage system
471
+
VolumeHandle string
472
+
473
+
// SnapshotHandle is a unique id returned by the CSI driver to identify a volume
474
+
// snapshot on the storage system
475
+
SnapshotHandle string
476
+
}
477
+
466
478
Type VolumeGroupSnapshotContentStatus struct {
467
479
// VolumeGroupSnapshotHandle is a unique id returned by the CSI driver
468
480
// to identify the VolumeGroupSnapshot on the storage system.
@@ -471,6 +483,12 @@ Type VolumeGroupSnapshotContentStatus struct {
471
483
// +optional
472
484
VolumeGroupSnapshotHandle *string
473
485
486
+
// VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id"
487
+
// pair returned by the CSI driver to identify snapshots and their source volumes
0 commit comments