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
-[Feature enablement and rollback](#feature-enablement-and-rollback)
46
47
-[Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
@@ -82,7 +83,7 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
82
83
-[x] (R) Production readiness review completed
83
84
-[x] Production readiness review approved
84
85
-[x] "Implementation History" section is up-to-date for milestone
85
-
-[] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
86
+
-[x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
86
87
-[ ] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
87
88
88
89
<!--
@@ -134,13 +135,15 @@ Note: In the following, we will use VolumeGroupSnapshot Controller to refer to t
134
135
* Admin creates a VolumeGroupSnapshotClass.
135
136
* User creates a VolumeGroupSnapshot with label selector that matches the label applied to all PVCs to be snapshotted together.
136
137
* 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 group snapshot logic in csi-snapshotter will retrieve all volumeSnapshotHandles, their source volumeHandles, and other information in the Volume Group Snapshot from the CSI CreateVolumeGroupSnapshotResponse, and update the VolumeGroupSnapshotContent status.
139
+
* In v1beta1, it populates the VolumeSnapshotHandlePairList field in the VolumeGroupSnapshotContent status.
140
+
* In v1beta2, it populates the VolumeSnapshotInfoList field in the VolumeGroupSnapshotContent status for the new v1beta2 API objects. The existing v1beta1 API objects will be converted to the new v1beta2 API objects. The conversion logic will only populate the VolumeHandle and SnapshotHandle fields and will leave the remaining fields empty. A conversion webhook will be developed to make the conversion.
138
141
* 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.
139
142
* CreateVolumeGroupSnapshot CSI function response
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.
143
+
* 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 VolumeSnapshotInfoList field in the VolumeGroupSnapshotContent status based on the returned list of snapshots from the CSI call. The VolumeGroupSnapshot controller can use VolumeSnapshotInfo to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound.
141
144
* Individual VolumeSnapshots will be named in this format:
142
-
* <snap>-<hash of VolumeGroupSnapshot UUID+PVC UUID+timestamp>
143
-
*A label with VolumeGroupSnapshot name will also be added to the VolumeSnapshot
145
+
* <snap>-<hash of VolumeGroupSnapshotContent UUID + volume handle>
146
+
* VolumeGroupSnapshot will also be added as an OwnerReference for the VolumeSnapshot
144
147
145
148
```
146
149
apiVersion: snapshot.storage.k8s.io/v1
@@ -156,7 +159,7 @@ status:
156
159
volumeGroupSnapshotName: groupSnapshot1
157
160
```
158
161
159
-
*An admissions controller or finalizer should be added to prevent an individual snapshot from being deleted that belongs to a VolumeGroupSnapshot. Note that there is a [KEP](https://github.com/kubernetes/enhancements/pull/2840/files) that is proposing the Liens feature which could potentially be used for this purpose.
162
+
*A finalizer should be added to prevent an individual snapshot from being deleted that belongs to a VolumeGroupSnapshot. Note that there is a [KEP](https://github.com/kubernetes/enhancements/pull/2840/files) that is proposing the Liens feature which could potentially be used for this purpose.
160
163
* In the CSI spec, it is specified that it is required for individual snapshots to be returned along with the group snapshot.
161
164
162
165
#### Pre-provisioned VolumeGroupSnapshot
@@ -165,6 +168,8 @@ Admin can create a VolumeGroupSnapshotContent, specifying an existing VolumeGrou
165
168
166
169
The controller will call the CSI GetVolumeGroupSnapshot method to retrieve all volumeSnapshotHandles in the Volume Group Snapshot from the storage system, create VolumeSnapshotContents pointing to the volumeSnapshotHandles. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
167
170
171
+
Note: The automatic creation of individual VolumeSnapshots and VolumeSnapshotContents are not done in Beta. For now, the admin will need to manually construct these individual API objects. We plan to work on this before the feature moves to GA. We have information for all the individual snapshots from CSI [GetVolumeGroupSnapshot](https://github.com/kubernetes-csi/external-snapshotter/blob/release-8.2/pkg/sidecar-controller/groupsnapshot_helper.go#L781). We should be able to populate individual VolumeSnapshots and VolumeSnapshotContents based on this information.
172
+
168
173
### Delete VolumeGroupSnapshot
169
174
170
175
A VolumeGroupSnapshot can be deleted if the CSI driver supports the CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT capability.
@@ -373,21 +378,6 @@ Type VolumeGroupSnapshotStatus struct {
373
378
374
379
// +optional
375
380
Error *VolumeSnapshotError
376
-
377
-
// VolumeSnapshotRefList is the list of PVC and VolumeSnapshot pairs that
378
-
// is part of this group snapshot.
379
-
// The maximum number of allowed snapshots in the group is 100.
380
-
// +optional
381
-
PVCVolumeSnapshotRefList []PVCVolumeSnapshotPair
382
-
}
383
-
384
-
// PVCVolumeSnapshotPair defines a pair of a PVC reference and a Volume Snapshot Reference
385
-
type PVCVolumeSnapshotPair struct {
386
-
// PersistentVolumeClaimRef is a reference to the PVC this pair is referring to
@@ -569,24 +590,23 @@ A new group controller service will be added with a new controller capability CR
569
590
Indicates that the controller plugin supports creating, deleting, and getting details of a snapshot of
570
591
multiple volumes.
571
592
593
+
A new controller capability GET_SNAPSHOT will also be added. This indicates that the controller plugin supports getting details of a snapshot of multiple volumes.
GetSnapshot is an optional controller capability that can help retrieve snapshot information. It can be used by Kubernetes to populate fields in individual VolumeSnapshotContents and VolumeSnapshots API objects that belong to a VolumeGroupSnapshot.
746
+
747
+
```
748
+
message GetSnapshotRequest {
749
+
// The ID of the snapshot to fetch current snapshot information for.
750
+
// This field is REQUIRED.
751
+
string snapshot_id = 1;
752
+
753
+
// Secrets required by plugin to complete GetSnapshot request.
754
+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
0 commit comments