Documentation ¶
Index ¶
- Constants
- Variables
- type CSIVolumeSnapshotSource
- type VolumeSnapshot
- type VolumeSnapshotClass
- type VolumeSnapshotClassList
- type VolumeSnapshotContent
- type VolumeSnapshotContentList
- type VolumeSnapshotContentSpec
- type VolumeSnapshotList
- type VolumeSnapshotSource
- type VolumeSnapshotSpec
- type VolumeSnapshotStatus
Constants ¶
const ( // VolumeSnapshotContentResourcePlural is "volumesnapshotcontents" VolumeSnapshotContentResourcePlural = "volumesnapshotcontents" // VolumeSnapshotResourcePlural is "volumesnapshots" VolumeSnapshotResourcePlural = "volumesnapshots" // VolumeSnapshotClassResourcePlural is "volumesnapshotclasses" VolumeSnapshotClassResourcePlural = "volumesnapshotclasses" GroupName = "snapshot.storage.k8s.io" Version = "v1alpha1" )
Variables ¶
var ( // VolSnapGVR specifies GVR schema for VolumeSnapshots VolSnapGVR = schema.GroupVersionResource{Group: GroupName, Version: Version, Resource: VolumeSnapshotResourcePlural} // VolSnapClassGVR specifies GVR schema for VolumeSnapshotClasses VolSnapClassGVR = schema.GroupVersionResource{Group: GroupName, Version: Version, Resource: VolumeSnapshotClassResourcePlural} // VolSnapContentGVR specifies GVR schema for VolumeSnapshotContents VolSnapContentGVR = schema.GroupVersionResource{Group: GroupName, Version: Version, Resource: VolumeSnapshotContentResourcePlural} )
Functions ¶
This section is empty.
Types ¶
type CSIVolumeSnapshotSource ¶
type CSIVolumeSnapshotSource struct { // Driver is the name of the driver to use for this snapshot. // This MUST be the same name returned by the CSI GetPluginName() call for // that driver. // Required. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` // SnapshotHandle is the unique snapshot id returned by the CSI volume // plugin’s CreateSnapshot to refer to the snapshot on all subsequent calls. // Required. SnapshotHandle string `json:"snapshotHandle" protobuf:"bytes,2,opt,name=snapshotHandle"` // Timestamp when the point-in-time snapshot is taken on the storage // system. This timestamp will be generated by the CSI volume driver after // the snapshot is cut. The format of this field should be 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. // This field is required in the CSI spec but optional here to support static binding. CreationTime *int64 `json:"creationTime,omitempty" protobuf:"varint,3,opt,name=creationTime"` // When restoring volume from the snapshot, the volume size should be equal to or // larger than the RestoreSize if it is specified. If RestoreSize is set to nil, it means // that the storage plugin does not have this information available. RestoreSize *int64 `json:"restoreSize,omitempty" protobuf:"bytes,4,opt,name=restoreSize"` }
CSIVolumeSnapshotSource represents the source from CSI volume snapshot
type VolumeSnapshot ¶
type VolumeSnapshot struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired characteristics of a snapshot requested by a user. Spec VolumeSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status represents the latest observed state of the snapshot Status VolumeSnapshotStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
VolumeSnapshot is a user's request for taking a snapshot. Upon successful creation of the actual snapshot by the volume provider it is bound to the corresponding VolumeSnapshotContent. Only the VolumeSnapshot object is accessible to the user in the namespace.
type VolumeSnapshotClass ¶
type VolumeSnapshotClass struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Snapshotter is the driver expected to handle this VolumeSnapshotClass. Snapshotter string `json:"snapshotter" protobuf:"bytes,2,opt,name=snapshotter"` // Parameters holds parameters for the snapshotter. // These values are opaque to the system and are passed directly // to the snapshotter. Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"` // Optional: what happens to a snapshot content when released from its snapshot. // The default policy is Delete if not specified. DeletionPolicy string `json:"deletionPolicy,omitempty" protobuf:"bytes,4,opt,name=deletionPolicy"` }
VolumeSnapshotClass describes the parameters used by storage system when provisioning VolumeSnapshots from PVCs. The name of a VolumeSnapshotClass object is significant, and is how users can request a particular class.
type VolumeSnapshotClassList ¶
type VolumeSnapshotClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of VolumeSnapshotClasses Items []VolumeSnapshotClass `json:"items" protobuf:"bytes,2,rep,name=items"` }
VolumeSnapshotClassList is a collection of snapshot classes.
type VolumeSnapshotContent ¶
type VolumeSnapshotContent struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec represents the desired state of the snapshot content Spec VolumeSnapshotContentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` }
VolumeSnapshotContent represents the actual "on-disk" snapshot object
type VolumeSnapshotContentList ¶
type VolumeSnapshotContentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of VolumeSnapshotContents Items []VolumeSnapshotContent `json:"items" protobuf:"bytes,2,rep,name=items"` }
VolumeSnapshotContentList is a list of VolumeSnapshotContent objects
type VolumeSnapshotContentSpec ¶
type VolumeSnapshotContentSpec struct { // Source represents the location and type of the volume snapshot VolumeSnapshotSource `json:",inline" protobuf:"bytes,1,opt,name=volumeSnapshotSource"` // VolumeSnapshotRef is part of bi-directional binding between VolumeSnapshot // and VolumeSnapshotContent. It becomes non-nil when bound. VolumeSnapshotRef *corev1.ObjectReference `json:"volumeSnapshotRef" protobuf:"bytes,2,opt,name=volumeSnapshotRef"` // PersistentVolumeRef represents the PersistentVolume that the snapshot has been // taken from. It becomes non-nil when VolumeSnapshot and VolumeSnapshotContent are bound. PersistentVolumeRef *corev1.ObjectReference `json:"persistentVolumeRef" protobuf:"bytes,3,opt,name=persistentVolumeRef"` // Name of the VolumeSnapshotClass used by the VolumeSnapshot. If not specified, a default snapshot class will // be used if it is available. VolumeSnapshotClassName string `json:"snapshotClassName" protobuf:"bytes,4,opt,name=snapshotClassName"` // Optional: what happens to a snapshot content when released from its snapshot. It will be set to Delete by default // if not specified DeletionPolicy string `json:"deletionPolicy" protobuf:"bytes,5,opt,name=deletionPolicy"` }
VolumeSnapshotContentSpec is the spec of the volume snapshot content
type VolumeSnapshotList ¶
type VolumeSnapshotList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of VolumeSnapshots Items []VolumeSnapshot `json:"items" protobuf:"bytes,2,rep,name=items"` }
VolumeSnapshotList is a list of VolumeSnapshot objects
type VolumeSnapshotSource ¶
type VolumeSnapshotSource struct { // CSI (Container Storage Interface) represents storage that handled by an external CSI Volume Driver (Alpha feature). CSI *CSIVolumeSnapshotSource `json:"csiVolumeSnapshotSource,omitempty"` }
VolumeSnapshotSource represents the actual location and type of the snapshot. Only one of its members may be specified.
type VolumeSnapshotSpec ¶
type VolumeSnapshotSpec struct { // Source has the information about where the snapshot is created from. // In Alpha version, only PersistentVolumeClaim is supported as the source. // If not specified, user can create VolumeSnapshotContent and bind it with VolumeSnapshot manually. Source *corev1.TypedLocalObjectReference `json:"source" protobuf:"bytes,1,opt,name=source"` // SnapshotContentName binds the VolumeSnapshot object with the VolumeSnapshotContent SnapshotContentName string `json:"snapshotContentName" protobuf:"bytes,2,opt,name=snapshotContentName"` // Name of the VolumeSnapshotClass used by the VolumeSnapshot. If not specified, a default snapshot class will // be used if it is available. VolumeSnapshotClassName string `json:"snapshotClassName" protobuf:"bytes,3,opt,name=snapshotClassName"` }
VolumeSnapshotSpec describes the common attributes of a volume snapshot
type VolumeSnapshotStatus ¶
type VolumeSnapshotStatus struct { // CreationTime is the time the snapshot was successfully created. If it is set, // it means the snapshot was created; Otherwise the snapshot was not created. CreationTime *metav1.Time `json:"creationTime" protobuf:"bytes,1,opt,name=creationTime"` // When restoring volume from the snapshot, the volume size should be equal to or // larger than the RestoreSize if it is specified. If RestoreSize is set to nil, it means // that the storage plugin does not have this information available. RestoreSize *resource.Quantity `json:"restoreSize" protobuf:"bytes,2,opt,name=restoreSize"` // ReadyToUse is set to true only if the snapshot is ready to use (e.g., finish uploading if // there is an uploading phase) and also VolumeSnapshot and its VolumeSnapshotContent // bind correctly with each other. If any of the above condition is not true, ReadyToUse is // set to false ReadyToUse bool `json:"readyToUse" protobuf:"varint,3,opt,name=readyToUse"` // The last error encountered during create snapshot operation, if any. // This field must only be set by the entity completing the create snapshot // operation, i.e. the external-snapshotter. Error *storage.VolumeError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeError"` }
VolumeSnapshotStatus is the status of the VolumeSnapshot