v1alpha1

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VolumeSnapshotContentResourcePlural is "volumesnapshotcontents"
	VolumeSnapshotContentResourcePlural = "volumesnapshotcontents"
	// VolumeSnapshotResourcePlural is "volumesnapshots"
	VolumeSnapshotResourcePlural = "volumesnapshots"
	// VolumeSnapshotClassResourcePlural is "volumesnapshotclasses"
	VolumeSnapshotClassResourcePlural = "volumesnapshotclasses"
)
View Source
const GroupName = "snapshot.storage.k8s.io"

GroupName is the group name use in this package.

Variables

View Source
var (
	// SchemeBuilder is the new scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme adds to scheme
	AddToScheme = SchemeBuilder.AddToScheme
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

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.
	// +optional
	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.
	// +optional
	RestoreSize *int64 `json:"restoreSize,omitempty" protobuf:"bytes,4,opt,name=restoreSize"`
}

CSIVolumeSnapshotSource represents the source from CSI volume snapshot

func (*CSIVolumeSnapshotSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIVolumeSnapshotSource.

func (*CSIVolumeSnapshotSource) DeepCopyInto

func (in *CSIVolumeSnapshotSource) DeepCopyInto(out *CSIVolumeSnapshotSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeletionPolicy added in v1.0.1

type DeletionPolicy string

DeletionPolicy describes a policy for end-of-life maintenance of volume snapshot contents

const (
	// VolumeSnapshotContentDelete means the snapshot content will be deleted from Kubernetes on release from its volume snapshot.
	VolumeSnapshotContentDelete DeletionPolicy = "Delete"

	// VolumeSnapshotContentRetain means the snapshot will be left in its current state on release from its volume snapshot.
	// The default policy is Retain if not specified.
	VolumeSnapshotContentRetain DeletionPolicy = "Retain"
)

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
	// +optional
	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
	// +optional
	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.

func (*VolumeSnapshot) DeepCopy

func (in *VolumeSnapshot) DeepCopy() *VolumeSnapshot

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshot.

func (*VolumeSnapshot) DeepCopyInto

func (in *VolumeSnapshot) DeepCopyInto(out *VolumeSnapshot)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshot) DeepCopyObject

func (in *VolumeSnapshot) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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
	// +optional
	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.
	// +optional
	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.
	// +optional
	DeletionPolicy *DeletionPolicy `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.

func (*VolumeSnapshotClass) DeepCopy

func (in *VolumeSnapshotClass) DeepCopy() *VolumeSnapshotClass

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotClass.

func (*VolumeSnapshotClass) DeepCopyInto

func (in *VolumeSnapshotClass) DeepCopyInto(out *VolumeSnapshotClass)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshotClass) DeepCopyObject

func (in *VolumeSnapshotClass) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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
	// +optional
	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.

func (*VolumeSnapshotClassList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotClassList.

func (*VolumeSnapshotClassList) DeepCopyInto

func (in *VolumeSnapshotClassList) DeepCopyInto(out *VolumeSnapshotClassList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshotClassList) DeepCopyObject

func (in *VolumeSnapshotClassList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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
	// +optional
	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

func (*VolumeSnapshotContent) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContent.

func (*VolumeSnapshotContent) DeepCopyInto

func (in *VolumeSnapshotContent) DeepCopyInto(out *VolumeSnapshotContent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshotContent) DeepCopyObject

func (in *VolumeSnapshotContent) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VolumeSnapshotContentList

type VolumeSnapshotContentList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	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

func (*VolumeSnapshotContentList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentList.

func (*VolumeSnapshotContentList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshotContentList) DeepCopyObject

func (in *VolumeSnapshotContentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

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.
	// +optional
	VolumeSnapshotRef *core_v1.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.
	// +optional
	PersistentVolumeRef *core_v1.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.
	// +optional
	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
	// +optional
	DeletionPolicy *DeletionPolicy `json:"deletionPolicy" protobuf:"bytes,5,opt,name=deletionPolicy"`
}

VolumeSnapshotContentSpec is the spec of the volume snapshot content

func (*VolumeSnapshotContentSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotContentSpec.

func (*VolumeSnapshotContentSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeSnapshotList

type VolumeSnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	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

func (*VolumeSnapshotList) DeepCopy

func (in *VolumeSnapshotList) DeepCopy() *VolumeSnapshotList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotList.

func (*VolumeSnapshotList) DeepCopyInto

func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VolumeSnapshotList) DeepCopyObject

func (in *VolumeSnapshotList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VolumeSnapshotSource

type VolumeSnapshotSource struct {
	// CSI (Container Storage Interface) represents storage that handled by an external CSI Volume Driver (Alpha feature).
	// +optional
	CSI *CSIVolumeSnapshotSource `json:"csiVolumeSnapshotSource,omitempty"`
}

VolumeSnapshotSource represents the actual location and type of the snapshot. Only one of its members may be specified.

func (*VolumeSnapshotSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotSource.

func (*VolumeSnapshotSource) DeepCopyInto

func (in *VolumeSnapshotSource) DeepCopyInto(out *VolumeSnapshotSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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.
	// +optional
	Source *core_v1.TypedLocalObjectReference `json:"source" protobuf:"bytes,1,opt,name=source"`

	// SnapshotContentName binds the VolumeSnapshot object with the VolumeSnapshotContent
	// +optional
	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.
	// +optional
	VolumeSnapshotClassName *string `json:"snapshotClassName" protobuf:"bytes,3,opt,name=snapshotClassName"`
}

VolumeSnapshotSpec describes the common attributes of a volume snapshot

func (*VolumeSnapshotSpec) DeepCopy

func (in *VolumeSnapshotSpec) DeepCopy() *VolumeSnapshotSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotSpec.

func (*VolumeSnapshotSpec) DeepCopyInto

func (in *VolumeSnapshotSpec) DeepCopyInto(out *VolumeSnapshotSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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.
	// +optional
	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.
	// +optional
	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
	// +optional
	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.
	// +optional
	Error *storage.VolumeError `json:"error,omitempty" protobuf:"bytes,4,opt,name=error,casttype=VolumeError"`
}

VolumeSnapshotStatus is the status of the VolumeSnapshot

func (*VolumeSnapshotStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotStatus.

func (*VolumeSnapshotStatus) DeepCopyInto

func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL