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,16 @@ 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.
141
+
* Note: We initially encountered an [issue](https://github.com/kubernetes-csi/external-snapshotter/issues/1271) where the restoreSize is not set for individual VolumeSnapshotContents and VolumeSnapshots if CSI driver does not implement ListSnapshots. We evaluated various options [here](https://docs.google.com/document/d/1LLBSHcnlLTaP6ZKjugtSGQHH2LGZPndyfnNqR1YvzS4/edit?tab=t.0). Making this v1beta2 API change is one option that can solve this problem. There is a second reason for making this v1beta2 API change. We need to make the v1beta2 API change for the pre-provisioned VolumeGroupSnapshot to automatically create individual VolumeSnapshots; otherwise, user has to manually create both group and individual snapshots API objects during static provisioning.
138
142
* 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
143
* 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.
144
+
* 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 VolumeSnapshotInfoList to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound.
141
145
* 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
146
+
* <snap>-<hash of VolumeGroupSnapshot UUID + volume handle>
147
+
* VolumeGroupSnapshot will also be added as an OwnerReference for the VolumeSnapshot
144
148
145
149
```
146
150
apiVersion: snapshot.storage.k8s.io/v1
@@ -156,7 +160,7 @@ status:
156
160
volumeGroupSnapshotName: groupSnapshot1
157
161
```
158
162
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.
163
+
*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
164
* In the CSI spec, it is specified that it is required for individual snapshots to be returned along with the group snapshot.
161
165
162
166
#### Pre-provisioned VolumeGroupSnapshot
@@ -165,6 +169,8 @@ Admin can create a VolumeGroupSnapshotContent, specifying an existing VolumeGrou
165
169
166
170
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
171
172
+
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.
173
+
168
174
### Delete VolumeGroupSnapshot
169
175
170
176
A VolumeGroupSnapshot can be deleted if the CSI driver supports the CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT capability.
@@ -202,8 +208,9 @@ N/A
202
208
Integration tests are not needed.
203
209
204
210
##### e2e tests
205
-
* e2e tests for external volume group snapshot controller.
206
-
* e2e tests for modified code path of external-snapshotter.
211
+
* e2e tests for external volume group snapshot control logic in the modified code path of external-snapshotter.
@@ -569,24 +592,23 @@ A new group controller service will be added with a new controller capability CR
569
592
Indicates that the controller plugin supports creating, deleting, and getting details of a snapshot of
570
593
multiple volumes.
571
594
595
+
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.
748
+
749
+
This is introduced because some CSI drivers cannot implement ListSnapshots RPC due to performance concerns. With the introduction of this new RPC, The CSI Snapshotter sidecar will call GetSnapshot if it is implemented. If GetSnapshot is not implemented, the snapshotter will fall back to the current behavior which is to call ListSnapshots instead. If neither GetSnapshot nor ListSnapshots is implemented, the snapshotter will fall back to the current behavior which is to assume the snapshot_id exists without being able to retrieve more information about this snapshot. Currently ListSnapshots is only called to retrieve status for pre-provisioned snapshots. The immediate use case of the new GetSnapshot RPC will also be for pre-provisioned snapshots. In the future, it is possible to use this API for other cases.
750
+
751
+
```
752
+
message GetSnapshotRequest {
753
+
// The ID of the snapshot to fetch current snapshot information for.
754
+
// This field is REQUIRED.
755
+
string snapshot_id = 1;
756
+
757
+
// Secrets required by plugin to complete GetSnapshot request.
758
+
// This field is OPTIONAL. Refer to the `Secrets Requirements`
In v1beta1, this is replaced with VolumeSnapshotInfoList: [snapshotHandle, volumeHandle, creationTime (*int64), readyToUse (*bool), restoreSize (*int64)]
986
+
946
987
- Estimated increase in size: (e.g., new annotation of size 32B):
947
988
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)
0 commit comments