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: client/hack/README.md
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,30 +144,49 @@ Update the restoreSize property to use type string only:
144
144
145
145
* Add the VolumeSnapshot namespace to the `additionalPrinterColumns` section. Refer https://github.com/kubernetes-csi/external-snapshotter/pull/535 for more details.
146
146
147
-
* In `client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml `, we need to add the `oneOf` constraint to make sure only one of `persistentVolumeNames` and `volumeGroupSnapshotHandle` is specified in the `source` field of the `spec` of `VolumeGroupSnapshotContent`.
147
+
* In `client/config/crd/groupsnapshot.storage.k8s.io_volumegroupsnapshotcontents.yaml `, we need to add the `oneOf` constraint to make sure only one of `volumeHandles` and `groupSnapshotHandles` is specified in the `source` field of the `spec` of `VolumeGroupSnapshotContent`.
148
148
149
149
```bash
150
150
source:
151
151
description: Source specifies whether the snapshot is (or should be)
152
152
dynamically provisioned or already exists, and just requires a Kubernetes
153
153
object representation. This field is immutable after creation. Required.
154
154
properties:
155
-
persistentVolumeNames:
156
-
description: PersistentVolumeNames is a list of names of PersistentVolumes
157
-
to be snapshotted together. It is specified for dynamic provisioning
158
-
of the VolumeGroupSnapshot. This field is immutable.
155
+
groupSnapshotHandles:
156
+
description: GroupSnapshotHandles specifies the CSI "group_snapshot_id"
157
+
of a pre-existing group snapshot and a list of CSI "snapshot_id"
158
+
of pre-existing snapshots on the underlying storage system for
159
+
which a Kubernetes object representation was (or should be)
160
+
created. This field is immutable.
161
+
properties:
162
+
volumeGroupSnapshotHandle:
163
+
description: VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id"
164
+
of a pre-existing group snapshot on the underlying storage
165
+
system for which a Kubernetes object representation was
166
+
(or should be) created. This field is immutable. Required.
167
+
type: string
168
+
volumeSnapshotHandles:
169
+
description: VolumeSnapshotHandles is a list of CSI "snapshot_id"
170
+
of pre-existing snapshots on the underlying storage system
171
+
for which Kubernetes objects representation were (or should
172
+
be) created. This field is immutable. Required.
173
+
items:
174
+
type: string
175
+
type: array
176
+
required:
177
+
- volumeGroupSnapshotHandle
178
+
- volumeSnapshotHandles
179
+
type: object
180
+
volumeHandles:
181
+
description: VolumeHandles is a list of volume handles on the
182
+
backend to be snapshotted together. It is specified for dynamic
183
+
provisioning of the VolumeGroupSnapshot. This field is immutable.
159
184
items:
160
185
type: string
161
186
type: array
162
-
volumeGroupSnapshotHandle:
163
-
description: VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id"
164
-
of a pre-existing group snapshot on the underlying storage system
165
-
for which a Kubernetes object representation was (or should
ctrl.updateGroupSnapshotErrorStatusWithEvent(groupSnapshot, true, v1.EventTypeWarning, "GroupSnapshotHandleSet", fmt.Sprintf("GroupSnapshot handle should not be set in group snapshot content %s for dynamic provisioning", uniqueGroupSnapshotName))
431
431
returnfmt.Errorf("VolumeGroupSnapshotHandle should not be set in the group snapshot content for dynamic provisioning for group snapshot %s", uniqueGroupSnapshotName)
// found a group snapshot content which represents a dynamically provisioned group snapshot
488
488
// update the group snapshot and return an error
489
489
ctrl.updateGroupSnapshotErrorStatusWithEvent(groupSnapshot, true, v1.EventTypeWarning, "GroupSnapshotContentMismatch", "VolumeGroupSnapshotContent is dynamically provisioned while expecting a pre-provisioned one")
ctrl.updateGroupSnapshotErrorStatusWithEvent(groupSnapshot, true, v1.EventTypeWarning, "GroupSnapshotContentMismatch", "VolumeGroupSnapshotContent "+contentName+" is pre-provisioned while expecting a dynamically provisioned one")
687
687
klog.V(4).Infof("sync group snapshot[%s]: group snapshot content %s is pre-provisioned while expecting a dynamically provisioned one", utils.GroupSnapshotKey(groupSnapshot), contentName)
688
688
returnnil, fmt.Errorf("group snapshot %s expects a dynamically provisioned VolumeGroupSnapshotContent %s but gets a pre-provisioned one", utils.GroupSnapshotKey(groupSnapshot), contentName)
0 commit comments