Skip to content

Commit ff22af0

Browse files
authored
Merge pull request #719 from xing-yang/backport_718
Backport 718: Add back v1beta1 manifests
2 parents 83d0e09 + 5a970ec commit ff22af0

File tree

4 files changed

+295
-0
lines changed

4 files changed

+295
-0
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,54 @@ spec:
7878
served: true
7979
storage: true
8080
subresources: {}
81+
- additionalPrinterColumns:
82+
- jsonPath: .driver
83+
name: Driver
84+
type: string
85+
- description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
86+
jsonPath: .deletionPolicy
87+
name: DeletionPolicy
88+
type: string
89+
- jsonPath: .metadata.creationTimestamp
90+
name: Age
91+
type: date
92+
name: v1beta1
93+
# This indicates the v1beta1 version of the custom resource is deprecated.
94+
# API requests to this version receive a warning in the server response.
95+
deprecated: true
96+
# This overrides the default warning returned to clients making v1beta1 API requests.
97+
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass"
98+
schema:
99+
openAPIV3Schema:
100+
description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced
101+
properties:
102+
apiVersion:
103+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
104+
type: string
105+
deletionPolicy:
106+
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. Required.
107+
enum:
108+
- Delete
109+
- Retain
110+
type: string
111+
driver:
112+
description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required.
113+
type: string
114+
kind:
115+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
116+
type: string
117+
parameters:
118+
additionalProperties:
119+
type: string
120+
description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes.
121+
type: object
122+
required:
123+
- deletionPolicy
124+
- driver
125+
type: object
126+
served: false
127+
storage: false
128+
subresources: {}
81129
status:
82130
acceptedNames:
83131
kind: ""

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

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,147 @@ spec:
247247
storage: true
248248
subresources:
249249
status: {}
250+
- additionalPrinterColumns:
251+
- description: Indicates if the snapshot is ready to be used to restore a volume.
252+
jsonPath: .status.readyToUse
253+
name: ReadyToUse
254+
type: boolean
255+
- description: Represents the complete size of the snapshot in bytes
256+
jsonPath: .status.restoreSize
257+
name: RestoreSize
258+
type: integer
259+
- description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted.
260+
jsonPath: .spec.deletionPolicy
261+
name: DeletionPolicy
262+
type: string
263+
- description: Name of the CSI driver used to create the physical snapshot on the underlying storage system.
264+
jsonPath: .spec.driver
265+
name: Driver
266+
type: string
267+
- description: Name of the VolumeSnapshotClass to which this snapshot belongs.
268+
jsonPath: .spec.volumeSnapshotClassName
269+
name: VolumeSnapshotClass
270+
type: string
271+
- description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
272+
jsonPath: .spec.volumeSnapshotRef.name
273+
name: VolumeSnapshot
274+
type: string
275+
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound.
276+
jsonPath: .spec.volumeSnapshotRef.namespace
277+
name: VolumeSnapshotNamespace
278+
type: string
279+
- jsonPath: .metadata.creationTimestamp
280+
name: Age
281+
type: date
282+
name: v1beta1
283+
# This indicates the v1beta1 version of the custom resource is deprecated.
284+
# API requests to this version receive a warning in the server response.
285+
deprecated: true
286+
# This overrides the default warning returned to clients making v1beta1 API requests.
287+
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotContent is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotContent"
288+
schema:
289+
openAPIV3Schema:
290+
description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system
291+
properties:
292+
apiVersion:
293+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
294+
type: string
295+
kind:
296+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
297+
type: string
298+
spec:
299+
description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required.
300+
properties:
301+
deletionPolicy:
302+
description: deletionPolicy determines whether this 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. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required.
303+
enum:
304+
- Delete
305+
- Retain
306+
type: string
307+
driver:
308+
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.
309+
type: string
310+
source:
311+
description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required.
312+
properties:
313+
snapshotHandle:
314+
description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable.
315+
type: string
316+
volumeHandle:
317+
description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable.
318+
type: string
319+
type: object
320+
volumeSnapshotClassName:
321+
description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation.
322+
type: string
323+
volumeSnapshotRef:
324+
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.
325+
properties:
326+
apiVersion:
327+
description: API version of the referent.
328+
type: string
329+
fieldPath:
330+
description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.'
331+
type: string
332+
kind:
333+
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
334+
type: string
335+
name:
336+
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
337+
type: string
338+
namespace:
339+
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
340+
type: string
341+
resourceVersion:
342+
description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
343+
type: string
344+
uid:
345+
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
346+
type: string
347+
type: object
348+
required:
349+
- deletionPolicy
350+
- driver
351+
- source
352+
- volumeSnapshotRef
353+
type: object
354+
status:
355+
description: status represents the current information of a snapshot.
356+
properties:
357+
creationTime:
358+
description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. 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.
359+
format: int64
360+
type: integer
361+
error:
362+
description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared.
363+
properties:
364+
message:
365+
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.'
366+
type: string
367+
time:
368+
description: time is the timestamp when the error was encountered.
369+
format: date-time
370+
type: string
371+
type: object
372+
readyToUse:
373+
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 by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown.
374+
type: boolean
375+
restoreSize:
376+
description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. 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.
377+
format: int64
378+
minimum: 0
379+
type: integer
380+
snapshotHandle:
381+
description: snapshotHandle is the CSI "snapshot_id" 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.
382+
type: string
383+
type: object
384+
required:
385+
- spec
386+
type: object
387+
served: false
388+
storage: false
389+
subresources:
390+
status: {}
250391
status:
251392
acceptedNames:
252393
kind: ""

0 commit comments

Comments
 (0)