Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions deploy/kubernetes/crd/volumesnapshotclasses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: volumesnapshotclasses.snapshot.storage.k8s.io
spec:
group: snapshot.storage.k8s.io
names:
kind: VolumeSnapshotClass
plural: volumesnapshotclasses
scope: Cluster
validation:
openAPIV3Schema:
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
properties:
apiVersion:
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/api-conventions.md#resources'
type: string
deletionPolicy:
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
type: string
driver:
description: driver is the name of the driver that handles this VolumeSnapshotClass.
type: string
kind:
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/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
description: parameters is a key-value map with storage driver specific
parameters for creating snapshots. These values are opaque to Kubernetes.
type: object
required:
- driver
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
139 changes: 139 additions & 0 deletions deploy/kubernetes/crd/volumesnapshotcontents.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: volumesnapshotcontents.snapshot.storage.k8s.io
spec:
group: snapshot.storage.k8s.io
names:
kind: VolumeSnapshotContent
plural: volumesnapshotcontents
scope: Cluster
validation:
openAPIV3Schema:
description: VolumeSnapshotContent represents the actual "on-disk" snapshot
object in the underlying storage system
properties:
apiVersion:
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/api-conventions.md#resources'
type: string
kind:
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/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 underlying storage system.
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:
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 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
type: string
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.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
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.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference is
made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: object
required:
- spec
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
136 changes: 136 additions & 0 deletions deploy/kubernetes/crd/volumesnapshots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: volumesnapshots.snapshot.storage.k8s.io
spec:
group: snapshot.storage.k8s.io
names:
kind: VolumeSnapshot
plural: volumesnapshots
scope: Namespaced
validation:
openAPIV3Schema:
description: VolumeSnapshot is a user's request for taking a point-in-time snapshot
of a PersistentVolumeClaim. Upon successful creation of a snapshot by the
underlying storage system, it is bound to a corresponding VolumeSnapshotContent.
properties:
apiVersion:
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/api-conventions.md#resources'
type: string
kind:
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/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:s//kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots'
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.
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.
type: string
kind:
description: Kind is the type of resource being referenced
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.
type: string
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.'
properties:
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'
format: date-time
type: string
error:
description: error is the latest 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
reported.
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.'
type: string
time:
description: time is the timestamp when the error was encountered.
format: date-time
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'
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'
type: string
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
3 changes: 3 additions & 0 deletions release-tools/prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@ main () {
if tests_need_non_alpha_cluster; then
start_cluster || die "starting the non-alpha cluster failed"

echo "deploying volume snapshot CRDs"
kubectl apply -f $(pwd)/deploy/kubernetes/crd

# Installing the driver might be disabled.
if install_hostpath "$images"; then
collect_cluster_info
Expand Down