Skip to content

Commit 0db4142

Browse files
committed
final adjustment on types.go based on feedback
feedback fixes
1 parent 9b86d7c commit 0db4142

4 files changed

+105
-136
lines changed

config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml

+20-17
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,30 @@ spec:
1313
scope: ""
1414
validation:
1515
openAPIV3Schema:
16-
description: VolumeSnapshotClass describes the parameters for a class of storage
17-
snapshotter for which VolumeSnapshot can be dynamically taken for a given
18-
PersistentVolumeClaim VolumeSnapshotClasses are non-namespaced. The name of
19-
a VolumeSnapshotClass object is significant, it serves as the unique identifier
20-
for a user to request a snapshot to be created using the specific VolumeSnapshotClass
16+
description: VolumeSnapshotClass specifies parameters that a underlying storage
17+
system uses when creating a volume snapshot. A specific VolumeSnapshotClass
18+
is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses
19+
are non-namespaced
2120
properties:
2221
apiVersion:
2322
description: 'APIVersion defines the versioned schema of this representation
2423
of an object. Servers should convert recognized schemas to the latest
2524
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
2625
type: string
2726
deletionPolicy:
28-
description: DeletionPolicy defines whether a VolumeSnapshotContent and
29-
its associated physical snapshot on underlying storage system should be
30-
deleted or not when released from its corresponding VolumeSnapshot. If
31-
not specified, the default will be VolumeSnapshotContentRetain for static
32-
binding, and VolumeSnapshotContentDelete for dynamic snapshot creation.
27+
description: DeletionPolicy determines whether a VolumeSnapshotContent created
28+
through the VolumeSnapshotClass should be deleted when it's associated
29+
VolumeSnapshot is deleted. Supported values are "Retain" and "Delete".
30+
"Retain" means that the VolumeSnapshotContent and its physical snapshot
31+
on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent
32+
and its physical snapshot on underlying storage system are deleted. If
33+
not specified, the default value is "Delete"
34+
enum:
35+
- Delete
36+
- Retain
37+
type: string
38+
driver:
39+
description: Driver is the name of the driver that handles this VolumeSnapshotClass.
3340
type: string
3441
kind:
3542
description: 'Kind is a string value representing the REST resource this
@@ -42,15 +49,11 @@ spec:
4249
parameters:
4350
additionalProperties:
4451
type: string
45-
description: Parameters holds parameters for underlying storage system.
46-
These values are opaque to Kubernetes.
52+
description: Parameters is a key-value map with storage driver specific
53+
parameters for creating snapshots. These values are opaque to Kubernetes.
4754
type: object
48-
snapshotter:
49-
description: Snapshotter is the name of the driver expected to handle VolumeSnapshot
50-
requests of this VolumeSnapshotClass.
51-
type: string
5255
required:
53-
- snapshotter
56+
- driver
5457
type: object
5558
version: v1beta1
5659
versions:

config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml

+34-68
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ spec:
3030
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
3131
type: object
3232
spec:
33-
description: Spec represents the desired state of the snapshot content
33+
description: Spec defines a specification of a VolumeSnapshotContent created
34+
by underlying storage system.
3435
properties:
3536
csiVolumeSnapshotSource:
36-
description: CSI (Container Storage Interface) represents storage that
37-
handled by an external CSI Volume Driver (Alpha feature).
37+
description: CSIVolumeSnapshotSource represents a volume snapshot created
38+
by a CSI(Container Storage Interface) driver..
3839
properties:
3940
creationTime:
4041
description: Timestamp when the point-in-time snapshot is taken
@@ -43,87 +44,52 @@ spec:
4344
The format of this field is a Unix nanoseconds time encoded as
4445
an int64. On Unix, the command `date +%s%N` returns the current
4546
time in nanoseconds (aka, epoch time) since 1970-01-01 00:00:00
46-
UTC. This field is required in the CSI spec however made optional
47-
here to support static binding.
47+
UTC.
4848
format: int64
4949
type: integer
5050
driver:
51-
description: Driver is the name of the driver used to create a physical
52-
snapshot on underlying storage system. This MUST be the same name
53-
returned by the CSI GetPluginName() call for that driver. Required.
51+
description: Driver is the name of the CSI driver used to create
52+
the physical snapshot on the underlying storage system. This MUST
53+
be the same name returned by the CSI GetPluginName() call for
54+
that driver. Required.
5455
type: string
5556
restoreSize:
56-
description: When restoring a volume from a snapshot, the volume
57-
size needs to be equal to or larger than the RestoreSize if it
58-
is specified. If RestoreSize is set to nil, in the dynamic snapshot
59-
creation case, it means that the underlying storage system does
60-
not have this information available; in the static binding case,
61-
this piece of information is not available.
57+
description: RestoreSize specifies the number of bytes that the
58+
snapshot's data would consumer when gets restored to a volume.
59+
This field is optional. When restoring a volume from a snapshot,
60+
the volume size needs to be equal to or larger than the RestoreSize
61+
if it is specified.
6262
format: int64
6363
type: integer
6464
snapshotHandle:
65-
description: SnapshotHandle is the unique id returned from the underlying
66-
storage system by the CSI driver's CreationSnapshot gRPC call.
67-
It serves as the only and sufficient handle when communicating
68-
with underlying storage systems via CSI driver for all subsequent
69-
calls on the specific VolumeSnapshot Required.
65+
description: SnapshotHandle is the snapshot id returned by the CSI
66+
driver in the CreateSnapshotResponse and is used as the snapshot
67+
identifier for all subsequent CSI calls. Required.
7068
type: string
7169
required:
7270
- driver
7371
- snapshotHandle
7472
type: object
7573
deletionPolicy:
76-
description: DeletionPolicy defines whether a VolumeSnapshotContent
77-
and its associated physical snapshot on underlying storage system
78-
should be deleted or not when released from its corresponding VolumeSnapshot.
79-
If not specified, the default will be VolumeSnapshotContentRetain
80-
for static binding, and VolumeSnapshotContentDelete for dynamic snapshot
81-
creation.
74+
description: DeletionPolicy determines whether this VolumeSnapshotContent
75+
and it's associated physical snapshot on the underlying storage system
76+
should be deleted when its VolumeSnapshot is deleted. Supported values
77+
are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent
78+
and its physical snapshot on underlying storage system are kept. "Delete"
79+
means that the VolumeSnapshotContent and its physical snapshot on
80+
underlying storage system are deleted. If not specified, the default
81+
value is "Retain"
82+
enum:
83+
- Delete
84+
- Retain
8285
type: string
83-
persistentVolumeRef:
84-
description: PersistentVolumeRef represents the PersistentVolume that
85-
the snapshot has been taken from. In dynamic snapshot creation case,
86-
the field will be specified when VolumeSnapshot and VolumeSnapshotContent
87-
are bound.
88-
properties:
89-
apiVersion:
90-
description: API version of the referent.
91-
type: string
92-
fieldPath:
93-
description: 'If referring to a piece of an object instead of an
94-
entire object, this string should contain a valid JSON/Go field
95-
access statement, such as desiredState.manifest.containers[2].
96-
For example, if the object reference is to a container within
97-
a pod, this would take on a value like: "spec.containers{name}"
98-
(where "name" refers to the name of the container that triggered
99-
the event) or if no container name is specified "spec.containers[2]"
100-
(container with index 2 in this pod). This syntax is chosen only
101-
to have some well-defined way of referencing a part of an object.
102-
TODO: this design is not final and this field is subject to change
103-
in the future.'
104-
type: string
105-
kind:
106-
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
107-
type: string
108-
name:
109-
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
110-
type: string
111-
namespace:
112-
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
113-
type: string
114-
resourceVersion:
115-
description: 'Specific resourceVersion to which this reference is
116-
made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency'
117-
type: string
118-
uid:
119-
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
120-
type: string
121-
type: object
12286
volumeSnapshotRef:
123-
description: VolumeSnapshotRef is part of bi-directional binding between
124-
VolumeSnapshot and VolumeSnapshotContent. Expect to be non-nil when
125-
bound. VolumeSnapshot.VolumeSnapshotContentName is the authoritative
126-
bind between VolumeSnapshot and VolumeSnapshotContent
87+
description: VolumeSnapshotRef specifies the VolumeSnapshot object that
88+
this VolumeSnapshotContent is associated with. The VolumeSnapshot.Spec.VolumeSnapshotContentName
89+
field must reference this VolumeSnapshotContent name for the association
90+
to be considered valid(a.k.a bi-directional binding). If the referenced
91+
VolumeSnapshot object does not exist(i.e., deleted by user), then
92+
the VolumeSnapshotContent.Spec.DeletionPolicy is triggered.
12793
properties:
12894
apiVersion:
12995
description: API version of the referent.

config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml

+12-10
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ spec:
1313
scope: ""
1414
validation:
1515
openAPIV3Schema:
16-
description: VolumeSnapshot is a user's request for taking a point in time snapshot
17-
of a volume. Upon successful creation of the snapshot by the volume provider,
18-
it is bound to a corresponding VolumeSnapshotContent. VolumeSnapshot objects
19-
are namespaced
16+
description: VolumeSnapshot is a user's request for taking a point-in-time snapshot
17+
of a PersistentVolumeClaim. Upon successful creation of the snapshot by the
18+
volume provider, it is bound to a corresponding VolumeSnapshotContent. VolumeSnapshot
19+
objects are namespaced
2020
properties:
2121
apiVersion:
2222
description: 'APIVersion defines the versioned schema of this representation
@@ -78,9 +78,10 @@ spec:
7878
rely on this piece of information programmatically.'
7979
properties:
8080
creationTime:
81-
description: CreationTime, if not nil, represents the timestamp when
81+
description: 'CreationTime, if not nil, represents the timestamp when
8282
a snapshot was successfully cut by the underlying storage system.
83-
In static binding, CreationTime might not be available.
83+
In static binding, CreationTime might not be available. NOTE: Controllers
84+
MUST NOT rely on this field programmatically'
8485
format: date-time
8586
type: string
8687
error:
@@ -98,19 +99,20 @@ spec:
9899
type: string
99100
type: object
100101
readyToUse:
101-
description: ReadyToUse is a status/informational flag which provides
102+
description: 'ReadyToUse is a status/informational flag which provides
102103
transparency to users. In the dynamic snapshot creation case, ReadyToUse
103104
will be set to true when underlying storage system has successfully
104105
finished all procedures out-of-bound to make a snapshot available
105106
AND snapshot controller has bound the VolumeSnapshot to a VolumeSnapshotContent
106-
successfully.
107+
successfully. NOTE: Controllers MUST NOT rely on this field programmatically'
107108
type: boolean
108109
restoreSize:
109-
description: RestoreSize, if not nil, represents the minimum volume
110+
description: 'RestoreSize, if not nil, represents the minimum volume
110111
size to restore from a VolumeSnapshot It is a storage system level
111112
property of a snapshot when the underlying storage system supports.
112113
The field could be nil if the underlying storage system does not have
113-
the information available, , or in cases like manual/static binding.
114+
the information available, or in cases like manual/static binding.
115+
NOTE: Controllers MUST NOT rely on this field programmatically'
114116
type: string
115117
required:
116118
- readyToUse

0 commit comments

Comments
 (0)