diff --git a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml index 75dba2f39..dacb532fd 100644 --- a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml +++ b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -9,7 +8,9 @@ spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshotClass + listKind: VolumeSnapshotClassList plural: volumesnapshotclasses + singular: volumesnapshotclass scope: Cluster validation: openAPIV3Schema: @@ -24,19 +25,23 @@ spec: internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' type: string deletionPolicy: + allOf: + - enum: + - Delete + - Retain + - enum: + - Delete + - Retain description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent - and its physical snapshot on underlying storage system are deleted. If - not specified, the default value is "Delete" - enum: - - Delete - - Retain + and its physical snapshot on underlying storage system are deleted. Required. type: string driver: - description: driver is the name of the driver that handles this VolumeSnapshotClass. + description: driver is the name of the storage driver that handles this + VolumeSnapshotClass. Required. type: string kind: description: 'Kind is a string value representing the REST resource this @@ -53,6 +58,7 @@ spec: parameters for creating snapshots. These values are opaque to Kubernetes. type: object required: + - deletionPolicy - driver type: object version: v1beta1 diff --git a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml index 205499386..60582479d 100644 --- a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml +++ b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -9,8 +8,12 @@ spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshotContent + listKind: VolumeSnapshotContentList plural: volumesnapshotcontents + singular: volumesnapshotcontent scope: Cluster + subresources: + status: {} validation: openAPIV3Schema: description: VolumeSnapshotContent represents the actual "on-disk" snapshot @@ -31,63 +34,59 @@ spec: type: object spec: description: spec defines properties of a VolumeSnapshotContent created - by underlying storage system. + by the underlying storage system. Required. properties: - csi: - description: csi represents a volume snapshot created by a CSI(Container - Storage Interface) driver. - properties: - creationTime: - description: creationTime is the timestamp when the point-in-time - snapshot is taken by the underlying storage system. This timestamp - is returned by the CSI driver after the snapshot is cut. The format - of this field is a Unix nanoseconds time encoded as an int64. - On Unix, the command `date +%s%N` returns the current time in - nanoseconds (aka, epoch time) since 1970-01-01 00:00:00 UTC. - format: int64 - type: integer - driver: - description: driver is the name of the CSI driver used to create - the physical snapshot on the underlying storage system. This MUST - be the same name returned by the CSI GetPluginName() call for - that driver. Required. - type: string - restoreSize: - description: restoreSize specifies the number of bytes that the - snapshot's data would consume when restored to a volume. When - restoring a volume from a snapshot, the volume size needs to be - equal to or larger than the RestoreSize if it is specified. - format: int64 - type: integer - snapshotHandle: - description: snapshotHandle is the snapshot id returned by the CSI - driver in the CreateSnapshotResponse and is used as the snapshot - identifier for all subsequent CSI calls. Required. - type: string - required: - - driver - - snapshotHandle - type: object deletionPolicy: + allOf: + - enum: + - Delete + - Retain + - enum: + - Delete + - Retain description: deletionPolicy determines whether this VolumeSnapshotContent - and its bound physical snapshot on the underlying storage system should - be deleted when its VolumeSnapshot is deleted. Supported values are - "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent + and its physical snapshot on the underlying storage system should + be deleted when its bound VolumeSnapshot is deleted. Supported values + are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on - underlying storage system are deleted. If not specified, the default - value is "Retain" - enum: - - Delete - - Retain + underlying storage system are deleted. In dynamic snapshot creation + case, this field will be filled in with the "DeletionPolicy" field + defined in the VolumeSnapshotClass the VolumeSnapshot refers to. For + pre-existing snapshots, users MUST specify this field when creating + the VolumeSnapshotContent object. Required. type: string + driver: + description: driver is the name of the CSI driver used to create the + physical snapshot on the underlying storage system. This MUST be the + same as the name returned by the CSI GetPluginName() call for that + driver. Required. + type: string + snapshotClassName: + description: name of the SnapshotClass to which this snapshot belongs. + type: string + source: + description: source specifies from where a snapshot will be created. + This field is immutable after creation. Required. + properties: + snapshotHandle: + description: snapshotHandle specifies the CSI name of a pre-existing + snapshot on the underlying storage system. This field is immutable + once specified. + type: string + volumeHandle: + description: volumeHandle specifies the CSI name of the volume from + which a snapshot should be dynamically taken from. This field + is immutable once specified. + type: string + type: object volumeSnapshotRef: - description: volumeSnapshotRef specifies the VolumeSnapshot object that - this VolumeSnapshotContent is bound with. The VolumeSnapshot.Spec.VolumeSnapshotContentName - field must reference this VolumeSnapshotContent name for the binding - to be considered valid(a.k.a bi-directional binding). If the referenced - VolumeSnapshot object does not exist(i.e., deleted by user), then - the VolumeSnapshotContent.Spec.DeletionPolicy is triggered. + description: volumeSnapshotRef specifies the VolumeSnapshot object to + which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName + field must reference to this VolumeSnapshotContent's name for the + bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent + object, name and namespace of the VolumeSnapshot object MUST be provided + for binding to happen. This field is immutable after creation. Required. properties: apiVersion: description: API version of the referent. @@ -122,6 +121,61 @@ spec: description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string type: object + required: + - deletionPolicy + - driver + - source + - volumeSnapshotRef + type: object + status: + description: status represents the current information of a snapshot. + properties: + creationTime: + description: creationTime is the timestamp when the point-in-time snapshot + is taken by the underlying storage system. This timestamp is returned + by the CSI driver after the snapshot is cut. The format of this field + is a Unix nanoseconds time encoded as an int64. On Unix, the command + `date +%s%N` returns the current time in nanoseconds since 1970-01-01 + 00:00:00 UTC. + format: int64 + type: integer + error: + description: error is the latest observed error during snapshot creation, + if any. + properties: + message: + description: 'message is a string detailing the encountered error + during snapshot creation if specified. NOTE: message may be logged, + and it should not contain sensitive information.' + type: string + time: + description: time is the timestamp when the error was encountered. + format: date-time + type: string + type: object + readyToUse: + description: readyToUse indicates if a snapshot is ready to be used + to restore a volume. In dynamic snapshot creation case, this field + will be filled in with the value returned from CSI "CreateSnapshotRequest" + gRPC call. For pre-existing snapshot, this field will be updated with + the value returned from CSI "ListSnapshots" gRPC call if the corresponding + driver supports. If not specified, it means the readiness of a snapshot + is unknown. + type: boolean + restoreSize: + description: restoreSize represents the complete size of the snapshot + in bytes. When restoring a volume from this snapshot, the size of + the volume MUST NOT be smaller than the restoreSize if it is specified. + Otherwise the restoration will fail. If not specified, it indicates + that the size is unknown. + format: int64 + minimum: 0 + type: integer + snapshotHandle: + description: snapshotHandle is the CSI name of a snapshot on the underlying + storage system. If not specified, it indicates that dynamic snapshot + creation has either failed or it is still in progress. + type: string type: object required: - spec diff --git a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml index 0ea2d800d..2a77746c0 100644 --- a/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +++ b/deploy/kubernetes-1.17/snapshotter/crd/snapshot.storage.k8s.io_volumesnapshots.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition @@ -9,8 +8,12 @@ spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshot + listKind: VolumeSnapshotList plural: volumesnapshots + singular: volumesnapshot scope: Namespaced + subresources: + status: {} validation: openAPIV3Schema: description: VolumeSnapshot is a user's request for taking a point-in-time snapshot @@ -32,62 +35,65 @@ spec: type: object spec: description: 'spec defines the desired characteristics of a snapshot requested - by a user. More info: https:s//kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots' + by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots + Required.' properties: source: - description: source specifies where a snapshot should be created from. - Currently, PersistentVolumeClaim is the only supported source type. - If specified, and VolumeSnapshotContentName is not specified(i.e., - nil), snapshot will be dynamically created from the given source. - If not specified, and VolumeSnapshotContentName is not specified, - system controller will fail on dynamic snapshot creation. + description: source specifies where a snapshot will be created from. + This field is immutable after creation. Required. properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the - core API group. For any other third-party types, APIGroup is required. + persistentVolumeClaimName: + description: persistentVolumeClaimName specifies the name of the + PersistentVolumeClaim object in the same namespace as the VolumeSnapshot + object where the snapshot should be dynamically taken from. This + field is immutable once specified. type: string - kind: - description: Kind is the type of resource being referenced + volumeSnapshotContentName: + description: volumeSnapshotContentName specifies the name of a pre-existing + VolumeSnapshotContent object. This field is immutable once specified. type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name type: object volumeSnapshotClassName: description: 'volumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. If not specified, the default snapshot - class will be used if there exists one. If not specified, and there - is no default snapshot class, dynamic VolumeSnapshot creation will - fail. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes' - type: string - volumeSnapshotContentName: - description: volumeSnapshotContentName is the name of the VolumeSnapshotContent - object backing the VolumeSnapshot. To request a pre-existing VolumeSnapshotContent - object, this field MUST be specified during VolumeSnapshot object - creation. Otherwise, a snapshot will be dynamically created, and this - field will be populated afterwards. + class will be used if one exists. If not specified, and there is no + default snapshot class, dynamic snapshot creation will fail. Empty + string is not allowed for this field. TODO(xiangqian): a webhook validation + on empty string. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshot-classes' type: string + required: + - source type: object status: description: 'status represents the current information of a snapshot. NOTE: - status can be modified by sources other than system controllers, and - must not be depended upon for accuracy. Controllers should only - be using information from the VolumeSnapshotContent object after - verifying that the binding is accurate and complete.' + status can be modified by sources other than system controllers, and must + not be depended upon for accuracy. Controllers should only use information + from the VolumeSnapshotContent object after verifying that the binding + is accurate and complete.' properties: + boundVolumeSnapshotContentName: + description: 'boundVolumeSnapshotContentName represents the name of + the VolumeSnapshotContent object to which the VolumeSnapshot object + is bound. If not specified, it indicates that the VolumeSnapshot object + has not been successfully bound to a VolumeSnapshotContent object + yet. NOTE: Specified boundVolumeSnapshotContentName alone does not + mean binding is valid. Controllers MUST always verify bidirectional + binding between VolumeSnapshot and VolumeSnapshotContent to + avoid possible security issues.' + type: string creationTime: - description: 'creationTime, if not nil, represents the timestamp when - a snapshot was successfully cut by the underlying storage system. - In static binding, CreationTime might not be available. NOTE: Controllers - MUST NOT rely on this field programmatically' + description: creationTime, if not nil, represents the timestamp when + the point-in-time snapshot was successfully cut on the underlying + storage system. In dynamic snapshot creation case, it will be filled + in upon snapshot creation. For a pre-existing snapshot, it will be + filled in once the VolumeSnapshot object has been successfully bound + to a VolumeSnapshotContent object and the underlying storage system + has the information available. If not specified, it indicates that + the creation time of the snapshot is unknown. format: date-time type: string error: - description: error is the latest observed error during snapshot creation, + description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error @@ -95,8 +101,8 @@ spec: properties: message: description: 'message is a string detailing the encountered error - during snapshot creation if specified. NOTE: message maybe logged, - thus it should not contain sensitive information.' + during snapshot creation if specified. NOTE: message may be logged, + and it should not contain sensitive information.' type: string time: description: time is the timestamp when the error was encountered. @@ -104,25 +110,28 @@ spec: type: string type: object readyToUse: - description: 'readyToUse is an informational flag which provides transparency - to users. In dynamic snapshot creation case, ReadyToUse will be set - to true when underlying storage system has successfully finished all - procedures out-of-bound to make a snapshot available AND snapshot - controller has bound the VolumeSnapshot to a VolumeSnapshotContent - successfully. If not specified(i.e., nil), it means the readiness - of the VolumeSnapshot is unknown to system controllers. NOTE: Controllers - MUST NOT rely on this field programmatically' + description: readyToUse indicates if a snapshot is ready to be used + to restore a volume. In dynamic snapshot creation case, readyToUse + will be set to true after underlying storage system has successfully + finished all out-of-bound procedures to make a snapshot ready to be + used to restore a volume. For a pre-existing snapshot, readyToUse + will be set to the value returned from CSI "ListSnapshots" gRPC call + if the matching CSI driver exists and supports. Otherwise, this field + will be set to "True". If not specified, it indicates that the readiness + of a snapshot is unknown. type: boolean restoreSize: - description: 'restoreSize specifies the number of bytes that the snapshot''s - data would consume when restored to a volume. When restoring a volume - from a snapshot, the volume size needs to be equal to or larger than - the RestoreSize if it is specified. The field could be nil if the - underlying storage system does not have the information available, - or in cases like static binding. NOTE: Controllers MUST NOT rely on - this field programmatically' + description: restoreSize represents the complete size of the snapshot + in bytes. The purpose of this field is to give user guidance on how + much space is needed to restore a volume from this snapshot. When + restoring a volume from a snapshot, the size of the volume MUST NOT + be less than the restoreSize. Otherwise the restoration will fail. + If this field is not specified, it indicates that underlying storage + system does not have the information available. type: string type: object + required: + - spec type: object version: v1beta1 versions: