Skip to content

Commit

Permalink
preserveUnknownField set to false, comments updates, adding pull requ…
Browse files Browse the repository at this point in the history
…est annotation
  • Loading branch information
yuxiangqian committed Oct 23, 2019
1 parent 2069e90 commit ba6ec14
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 81 deletions.
17 changes: 7 additions & 10 deletions config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (devel)
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139"
creationTimestamp: null
name: volumesnapshotclasses.snapshot.storage.k8s.io
spec:
Expand All @@ -13,6 +16,7 @@ spec:
plural: volumesnapshotclasses
singular: volumesnapshotclass
scope: Cluster
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: VolumeSnapshotClass specifies parameters that a underlying storage
Expand All @@ -26,19 +30,15 @@ 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. Required.
enum:
- Delete
- Retain
type: string
driver:
description: driver is the name of the storage driver that handles this
Expand All @@ -49,9 +49,6 @@ spec:
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/api-conventions.md#types-kinds'
type: string
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
type: object
parameters:
additionalProperties:
type: string
Expand Down
63 changes: 33 additions & 30 deletions config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (devel)
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139"
creationTimestamp: null
name: volumesnapshotcontents.snapshot.storage.k8s.io
spec:
Expand All @@ -15,6 +18,7 @@ spec:
scope: Cluster
subresources:
status: {}
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: VolumeSnapshotContent represents the actual "on-disk" snapshot
Expand All @@ -30,21 +34,11 @@ spec:
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/api-conventions.md#types-kinds'
type: string
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
type: object
spec:
description: spec defines properties of a VolumeSnapshotContent created
by the underlying storage system. Required.
properties:
deletionPolicy:
allOf:
- enum:
- Delete
- Retain
- enum:
- Delete
- Retain
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
Expand All @@ -56,6 +50,9 @@ spec:
defined in the VolumeSnapshotClass the VolumeSnapshot refers to. For
pre-existing snapshots, users MUST specify this field when creating
the VolumeSnapshotContent object. Required.
enum:
- Delete
- Retain
type: string
driver:
description: driver is the name of the CSI driver used to create the
Expand All @@ -72,13 +69,12 @@ spec:
properties:
snapshotHandle:
description: snapshotHandle specifies the CSI name of a pre-existing
snapshot on the underlying storage system. This field is immutable
once specified.
snapshot on the underlying storage system. This field is immutable.
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.
is immutable.
type: string
type: object
volumeSnapshotRef:
Expand Down Expand Up @@ -133,11 +129,14 @@ spec:
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.
is taken by the underlying storage system. In dynamic snapshot creation
case, this field will be filled in with the "creation_time" value
returned from CSI "CreateSnapshotRequest" gRPC call. For pre-existing
snapshot, this field will be filled with the "creation_time" value
returned from CSI "ListSnapshots" gRPC call if the CSI driver supports.
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:
Expand All @@ -157,25 +156,29 @@ spec:
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.
will be filled in with the "ready_to_use" value returned from CSI
"CreateSnapshotRequest" gRPC call. For pre-existing snapshot, this
field will be filled with the "read_to_use" value returned from CSI
"ListSnapshots" gRPC call if the CSI 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.
in bytes. In dynamic snapshot creation case, this field will be filled
in with the "size_bytes" value returned from CSI "CreateSnapshotRequest"
gRPC call. For pre-existing snapshot, this field will be filled with
the "size_bytes" value returned from CSI "ListSnapshots" gRPC call
if the CSI driver supports. 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.
description: snapshotHandle is the "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.
type: string
type: object
required:
Expand Down
45 changes: 26 additions & 19 deletions config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (devel)
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/139"
creationTimestamp: null
name: volumesnapshots.snapshot.storage.k8s.io
spec:
Expand All @@ -15,6 +18,7 @@ spec:
scope: Namespaced
subresources:
status: {}
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: VolumeSnapshot is a user's request for taking a point-in-time snapshot
Expand All @@ -31,9 +35,6 @@ spec:
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/api-conventions.md#types-kinds'
type: string
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
type: object
spec:
description: 'spec defines the desired characteristics of a snapshot requested
by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots
Expand All @@ -47,11 +48,11 @@ spec:
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.
field is immutable.
type: string
volumeSnapshotContentName:
description: volumeSnapshotContentName specifies the name of a pre-existing
VolumeSnapshotContent object. This field is immutable once specified.
VolumeSnapshotContent object. This field is immutable.
type: string
type: object
volumeSnapshotClassName:
Expand Down Expand Up @@ -83,14 +84,15 @@ spec:
avoid possible security issues.'
type: string
creationTime:
description: creationTime, if not nil, represents the timestamp when
description: creationTime, if specified, 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.
in upon snapshot creation with the "creation_time" field returned
from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot,
it will be set to the "size_byte" value returned from CSI "ListSnapshots"
gRPC call if there exists a matching CSI driver that supports it after
binding. If not specified, it indicates that the creation time of
the snapshot is unknown.
format: date-time
type: string
error:
Expand All @@ -116,19 +118,24 @@ spec:
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.
will be set to the "read_to_use" field returned from CSI "ListSnapshots"
gRPC call if there exists a matching CSI driver that supports it after
binding. 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 represents the complete size of the snapshot
in bytes. The purpose of this field is to give user guidance on how
description: restoreSize, if specified, represents the complete size
of the snapshot in bytes. In dynamic snapshot creation case, restoreSize
will be filled with the "size_bytes" value returned from "CreateSnapshot"
gRPC call. For a pre-existing snapshot, restoreSize will be filled
with the "size_bytes" value returned from CSI "ListSnapshots" gRPC
call if there exists a matching CSI driver that supports it after
binding. 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.
If not specified, it indicates that underlying storage system does
not have the information available.
type: string
type: object
required:
Expand Down
Loading

0 comments on commit ba6ec14

Please sign in to comment.