@@ -26,9 +26,8 @@ import (
26
26
// +genclient
27
27
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
28
28
29
- // VolumeSnapshot is a user's request for taking a point-in-time snapshot of a PersistentVolumeClaim.
30
- // Upon successful creation of a snapshot by the underlying storage system, it is bound to a
31
- // corresponding VolumeSnapshotContent.
29
+ // VolumeSnapshot is a user's request for either creating a point-in-time
30
+ // snapshot of a persistent volume, or binding to a pre-existing snapshot.
32
31
// +kubebuilder:object:root=true
33
32
// +kubebuilder:resource:scope=Namespaced
34
33
// +kubebuilder:subresource:status
@@ -119,9 +118,9 @@ type VolumeSnapshotStatus struct {
119
118
// snapshot was successfully cut on the underlying storage system.
120
119
// In dynamic snapshot creation case, it will be filled in upon snapshot creation
121
120
// with the "creation_time" field returned from CSI "CreateSnapshot" gRPC call.
122
- // For a pre-existing snapshot, it will be set to the "size_byte " value returned
123
- // from CSI "ListSnapshots" gRPC call if there exists a matching CSI driver that
124
- // supports it after binding.
121
+ // For a pre-existing snapshot, it will be set to the "size_bytes " value returned
122
+ // from the CSI "ListSnapshots" gRPC call if the driver exists and supports it
123
+ // after binding.
125
124
// If not specified, it indicates that the creation time of the snapshot is unknown.
126
125
// +optional
127
126
CreationTime * metav1.Time `json:"creationTime,omitempty" protobuf:"bytes,2,opt,name=creationTime"`
@@ -130,9 +129,9 @@ type VolumeSnapshotStatus struct {
130
129
// In dynamic snapshot creation case, readyToUse will be set to true after underlying storage
131
130
// system has successfully finished all out-of-bound procedures to make a snapshot ready to
132
131
// be used to restore a volume.
133
- // For a pre-existing snapshot, readyToUse will be set to the "read_to_use " field
134
- // returned from CSI "ListSnapshots" gRPC call if there exists a matching CSI driver
135
- // that supports it after binding.
132
+ // For a pre-existing snapshot, readyToUse will be set to the "ready_to_use " field
133
+ // returned from the CSI "ListSnapshots" gRPC call if the driver exists and
134
+ // supports it after binding.
136
135
// Otherwise, this field will be set to "True".
137
136
// If not specified, it indicates that the readiness of a snapshot is unknown.
138
137
// +optional
@@ -295,14 +294,14 @@ type VolumeSnapshotContentSpec struct {
295
294
// TODO(xiangqian): Add a webhook to ensure that VolumeSnapshotContentSource members
296
295
// will be immutable once specified.
297
296
type VolumeSnapshotContentSource struct {
298
- // volumeHandle specifies the CSI name of the volume from which a snapshot
297
+ // volumeHandle specifies the "volume_id" of the volume from which a snapshot
299
298
// should be dynamically taken from.
300
299
// This field is immutable.
301
300
// +optional
302
301
VolumeHandle * string `json:"volumeHandle,omitempty" protobuf:"bytes,1,opt,name=volumeHandle"`
303
302
304
- // snapshotHandle specifies the CSI name of a pre-existing snapshot on the
305
- // underlying storage system.
303
+ // snapshotHandle specifies the "snapshot_id" of a pre-existing snapshot on
304
+ // the underlying storage system.
306
305
// This field is immutable.
307
306
// +optional
308
307
SnapshotHandle * string `json:"snapshotHandle,omitempty" protobuf:"bytes,2,opt,name=snapshotHandle"`
@@ -321,7 +320,7 @@ type VolumeSnapshotContentStatus struct {
321
320
// In dynamic snapshot creation case, this field will be filled in with the
322
321
// "creation_time" value returned from CSI "CreateSnapshotRequest" gRPC call.
323
322
// For pre-existing snapshot, this field will be filled with the "creation_time"
324
- // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports.
323
+ // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it .
325
324
// The format of this field is a Unix nanoseconds time encoded as an int64.
326
325
// On Unix, the command `date +%s%N` returns the current time in nanoseconds
327
326
// since 1970-01-01 00:00:00 UTC.
@@ -332,7 +331,7 @@ type VolumeSnapshotContentStatus struct {
332
331
// In dynamic snapshot creation case, this field will be filled in with the
333
332
// "size_bytes" value returned from CSI "CreateSnapshotRequest" gRPC call.
334
333
// For pre-existing snapshot, this field will be filled with the "size_bytes"
335
- // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports.
334
+ // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it .
336
335
// When restoring a volume from this snapshot, the size of the volume MUST NOT
337
336
// be smaller than the restoreSize if it is specified.
338
337
// Otherwise the restoration will fail.
@@ -344,8 +343,8 @@ type VolumeSnapshotContentStatus struct {
344
343
// readyToUse indicates if a snapshot is ready to be used to restore a volume.
345
344
// In dynamic snapshot creation case, this field will be filled in with the
346
345
// "ready_to_use" value returned from CSI "CreateSnapshotRequest" gRPC call.
347
- // For pre-existing snapshot, this field will be filled with the "read_to_use "
348
- // value returned from CSI "ListSnapshots" gRPC call if the CSI driver supports.
346
+ // For pre-existing snapshot, this field will be filled with the "ready_to_use "
347
+ // value returned from the CSI "ListSnapshots" gRPC call if the driver supports it .
349
348
// If not specified, it means the readiness of a snapshot is unknown.
350
349
// +optional.
351
350
ReadyToUse * bool `json:"readyToUse,omitempty" protobuf:"varint,4,opt,name=readyToUse"`
0 commit comments