v1

package
v0.0.0-...-ef9bc7b Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeSnapshotDataResourcePlural = "volumesnapshotdatas"
	VolumeSnapshotDataResource       = "volume-snapshot-data"
	VolumeSnapshotResourcePlural     = "volumesnapshots"
	VolumeSnapshotResource           = "volume-snapshot"
)
View Source
const GroupName = "volume-snapshot-data.external-storage.k8s.io"

GroupName is the group name use in this package.

Variables

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

Functions

func GetSupportedVolumeFromPVSpec

func GetSupportedVolumeFromPVSpec(spec *core_v1.PersistentVolumeSpec) string

func Resource

func Resource(resource string) schema.GroupResource

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

Types

type AWSElasticBlockStoreVolumeSnapshotSource

type AWSElasticBlockStoreVolumeSnapshotSource struct {
	// Unique id of the persistent disk snapshot resource. Used to identify the disk snapshot in AWS
	SnapshotID string `json:"snapshotId"`
}

AWS EBS volume snapshot source

type CinderVolumeSnapshotSource

type CinderVolumeSnapshotSource struct {
	// Unique id of the cinder volume snapshot resource. Used to identify the snapshot in OpenStack
	SnapshotID string `json:"snapshotId"`
}

Cinder volume snapshot source

type GCEPersistentDiskSnapshotSource

type GCEPersistentDiskSnapshotSource struct {
	// Unique id of the persistent disk snapshot resource. Used to identify the disk snapshot in GCE
	SnapshotName string `json:"snapshotId"`
}

GCE PD volume snapshot source

type HostPathVolumeSnapshotSource

type HostPathVolumeSnapshotSource struct {
	// Path represents a tar file that stores the HostPath volume source
	Path string `json:"snapshot"`
}

HostPath volume snapshot source

type VolumeSnapshot

type VolumeSnapshot struct {
	metav1.TypeMeta `json:",inline"`
	Metadata        metav1.ObjectMeta `json:"metadata"`

	// Spec represents the desired state of the snapshot
	// +optional
	Spec VolumeSnapshotSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the latest observer state of the snapshot
	// +optional
	Status VolumeSnapshotStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}

The volume snapshot object accessible to the user. Upon succesful creation of the actual snapshot by the volume provider it is bound to the corresponding VolumeSnapshotData through the VolumeSnapshotSpec

func (*VolumeSnapshot) GetObjectKind

func (v *VolumeSnapshot) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*VolumeSnapshot) GetObjectMeta

func (v *VolumeSnapshot) GetObjectMeta() metav1.Object

Required to satisfy ObjectMetaAccessor interface

func (*VolumeSnapshot) UnmarshalJSON

func (e *VolumeSnapshot) UnmarshalJSON(data []byte) error

type VolumeSnapshotCondition

type VolumeSnapshotCondition struct {
	// Type of replication controller condition.
	Type VolumeSnapshotConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=VolumeSnapshotConditionType"`
	// Status of the condition, one of True, False, Unknown.
	Status core_v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// The last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,3,opt,name=lastTransitionTime"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason" protobuf:"bytes,4,opt,name=reason"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message" protobuf:"bytes,5,opt,name=message"`
}

VolumeSnapshot Condition describes the state of a volume snapshot at a certain point.

type VolumeSnapshotConditionType

type VolumeSnapshotConditionType string
const (
	// VolumeSnapshotReady is added when the snapshot has been successfully created and is ready to be used.
	VolumeSnapshotConditionReady VolumeSnapshotConditionType = "Ready"
)

These are valid conditions of a volume snapshot.

type VolumeSnapshotCopy

type VolumeSnapshotCopy VolumeSnapshot

type VolumeSnapshotData

type VolumeSnapshotData struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	Metadata metav1.ObjectMeta `json:"metadata"`

	// Spec represents the desired state of the snapshot
	// +optional
	Spec VolumeSnapshotDataSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the latest observed state of the snapshot
	// +optional
	Status VolumeSnapshotDataStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}

VolumeSnapshotData represents the actual "on-disk" snapshot object

func (*VolumeSnapshotData) GetObjectKind

func (v *VolumeSnapshotData) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*VolumeSnapshotData) GetObjectMeta

func (v *VolumeSnapshotData) GetObjectMeta() metav1.Object

Required to satisfy ObjectMetaAccessor interface

func (*VolumeSnapshotData) UnmarshalJSON

func (e *VolumeSnapshotData) UnmarshalJSON(data []byte) error

type VolumeSnapshotDataCondition

type VolumeSnapshotDataCondition struct {
	// Type of volume snapshot condition.
	Type VolumeSnapshotDataConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=VolumeSnapshotDataConditionType"`
	// Status of the condition, one of True, False, Unknown.
	Status core_v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
	// The last time the condition transitioned from one status to another.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,3,opt,name=lastTransitionTime"`
	// The reason for the condition's last transition.
	// +optional
	Reason string `json:"reason" protobuf:"bytes,4,opt,name=reason"`
	// A human readable message indicating details about the transition.
	// +optional
	Message string `json:"message" protobuf:"bytes,5,opt,name=message"`
}

VolumeSnapshot Condition describes the state of a volume snapshot at a certain point.

type VolumeSnapshotDataConditionType

type VolumeSnapshotDataConditionType string
const (
	// VolumeSnapshotDataReady is added when the on-disk snapshot has been successfully created.
	VolumeSnapshotDataConditionReady VolumeSnapshotDataConditionType = "Ready"
	// VolumeSnapshotDataPending is added when the on-disk snapshot has been successfully created but is not available to use.
	VolumeSnapshotDataConditionPending VolumeSnapshotDataConditionType = "Pending"
	// VolumeSnapshotDataError is added but the on-disk snapshot is failed to created
	VolumeSnapshotDataConditionError VolumeSnapshotDataConditionType = "Error"
)

These are valid conditions of a volume snapshot.

type VolumeSnapshotDataCopy

type VolumeSnapshotDataCopy VolumeSnapshotData

type VolumeSnapshotDataList

type VolumeSnapshotDataList struct {
	metav1.TypeMeta `json:",inline"`
	Metadata        metav1.ListMeta      `json:"metadata"`
	Items           []VolumeSnapshotData `json:"items"`
}

func (*VolumeSnapshotDataList) GetListMeta

func (vd *VolumeSnapshotDataList) GetListMeta() metav1.List

Required to satisfy ListMetaAccessor interface

func (*VolumeSnapshotDataList) GetObjectKind

func (vd *VolumeSnapshotDataList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*VolumeSnapshotDataList) UnmarshalJSON

func (el *VolumeSnapshotDataList) UnmarshalJSON(data []byte) error

type VolumeSnapshotDataListCopy

type VolumeSnapshotDataListCopy VolumeSnapshotDataList

type VolumeSnapshotDataSource

type VolumeSnapshotDataSource struct {
	// HostPath represents a directory on the host.
	// Provisioned by a developer or tester.
	// This is useful for single-node development and testing only!
	// On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
	// +optional
	HostPath *HostPathVolumeSnapshotSource `json:"hostPath,omitempty"`
	// AWSElasticBlockStore represents an AWS Disk resource that is attached to a
	// kubelet's host machine and then exposed to the pod.
	// More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
	// +optional
	AWSElasticBlockStore *AWSElasticBlockStoreVolumeSnapshotSource `json:"awsElasticBlockStore,omitempty"`
	// GCEPersistentDiskSnapshotSource represents an GCE PD snapshot resource
	// +optional
	GCEPersistentDiskSnapshot *GCEPersistentDiskSnapshotSource `json:"gcePersistentDisk,omitempty"`
	// CinderVolumeSnapshotSource represents Cinder snapshot resource
	// +optional
	CinderSnapshot *CinderVolumeSnapshotSource `json:"cinderVolume,omitempty"`
}

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

type VolumeSnapshotDataSpec

type VolumeSnapshotDataSpec struct {
	// Source represents the location and type of the volume snapshot
	VolumeSnapshotDataSource `json:",inline" protobuf:"bytes,1,opt,name=volumeSnapshotDataSource"`

	// VolumeSnapshotRef is part of bi-directional binding between VolumeSnapshot
	// and VolumeSnapshotData
	// +optional
	VolumeSnapshotRef *core_v1.ObjectReference `json:"volumeSnapshotRef" protobuf:"bytes,2,opt,name=volumeSnapshotRef"`

	// PersistentVolumeRef represents the PersistentVolume that the snapshot has been
	// taken from
	// +optional
	PersistentVolumeRef *core_v1.ObjectReference `json:"persistentVolumeRef" protobuf:"bytes,3,opt,name=persistentVolumeRef"`
}

The desired state of the volume snapshot

type VolumeSnapshotDataStatus

type VolumeSnapshotDataStatus struct {
	// The time the snapshot was successfully created
	// +optional
	CreationTimestamp metav1.Time `json:"creationTimestamp" protobuf:"bytes,1,opt,name=creationTimestamp"`

	// Representes the lates available observations about the volume snapshot
	Conditions []VolumeSnapshotDataCondition `json:"conditions" protobuf:"bytes,2,rep,name=conditions"`
}

The actual state of the volume snapshot

type VolumeSnapshotList

type VolumeSnapshotList struct {
	metav1.TypeMeta `json:",inline"`
	Metadata        metav1.ListMeta  `json:"metadata"`
	Items           []VolumeSnapshot `json:"items"`
}

func (*VolumeSnapshotList) GetListMeta

func (vd *VolumeSnapshotList) GetListMeta() metav1.List

Required to satisfy ListMetaAccessor interface

func (*VolumeSnapshotList) GetObjectKind

func (vd *VolumeSnapshotList) GetObjectKind() schema.ObjectKind

Required to satisfy Object interface

func (*VolumeSnapshotList) UnmarshalJSON

func (el *VolumeSnapshotList) UnmarshalJSON(data []byte) error

type VolumeSnapshotListCopy

type VolumeSnapshotListCopy VolumeSnapshotList

type VolumeSnapshotSpec

type VolumeSnapshotSpec struct {
	// PersistentVolumeClaimName is the name of the PVC being snapshotted
	// +optional
	PersistentVolumeClaimName string `json:"persistentVolumeClaimName" protobuf:"bytes,1,opt,name=persistentVolumeClaimName"`

	// SnapshotDataName binds the VolumeSnapshot object with the VolumeSnapshotData
	// +optional
	SnapshotDataName string `json:"snapshotDataName" protobuf:"bytes,2,opt,name=snapshotDataName"`
}

The desired state of the volume snapshot

type VolumeSnapshotStatus

type VolumeSnapshotStatus struct {
	// The time the snapshot was successfully created
	// +optional
	CreationTimestamp metav1.Time `json:"creationTimestamp" protobuf:"bytes,1,opt,name=creationTimestamp"`

	// Representes the lates available observations about the volume snapshot
	Conditions []VolumeSnapshotCondition `json:"conditions" protobuf:"bytes,2,rep,name=conditions"`
}

Jump to

Keyboard shortcuts

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