v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 is the API version +groupName=local.openebs.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder is the scheme builder
	// with scheme init functions to run
	// for this API package
	SchemeBuilder runtime.SchemeBuilder

	// AddToScheme is a global function that
	// registers this API group & version to
	// a scheme
	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   "local.openebs.io",
	Version: "v1alpha1",
}

SchemeGroupVersion is group version used to register custom resources

NOTE:

This variable name should not be changed

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Device

type Device struct {
	// Name of the device(from the meta partition)
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// UUID denotes a unique identity of a device.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	UUID string `json:"uuid"`

	// Size specifies the total size of the device.
	// +kubebuilder:validation:Required
	Size resource.Quantity `json:"size"`
	// Free specifies the available capacity of the device.
	// +kubebuilder:validation:Required
	Free resource.Quantity `json:"free"`
}

Device specifies attributes of a given device that exists on node.

func (*Device) DeepCopy

func (in *Device) DeepCopy() *Device

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

func (*Device) DeepCopyInto

func (in *Device) DeepCopyInto(out *Device)

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

type DeviceNode

type DeviceNode struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Devices []Device `json:"devices"`
}

DeviceNode records information about all devices available in a node. In general, the openebs node-agent creates the DeviceNode object & periodically synchronizing the devices available in the node. DeviceNode has an owner reference pointing to the corresponding node object. +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced

func (*DeviceNode) DeepCopy

func (in *DeviceNode) DeepCopy() *DeviceNode

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

func (*DeviceNode) DeepCopyInto

func (in *DeviceNode) DeepCopyInto(out *DeviceNode)

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

func (*DeviceNode) DeepCopyObject

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

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

type DeviceNodeList

type DeviceNodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []DeviceNode `json:"items"`
}

DeviceNodeList is a collection of DeviceNode resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +resource:path=devicenodes

func (*DeviceNodeList) DeepCopy

func (in *DeviceNodeList) DeepCopy() *DeviceNodeList

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

func (*DeviceNodeList) DeepCopyInto

func (in *DeviceNodeList) DeepCopyInto(out *DeviceNodeList)

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

func (*DeviceNodeList) DeepCopyObject

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

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

type DeviceVolume

type DeviceVolume struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VolumeInfo `json:"spec"`
	Status VolStatus  `json:"status,omitempty"`
}

DeviceVolume represents a Device based volume +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=devicevol +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.spec.ownerNodeID`,description="Node where the volume is created" +kubebuilder:printcolumn:name="Size",type=string,JSONPath=`.spec.capacity`,description="Size of the volume" +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.state`,description="Status of the volume" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age of the volume"

func (*DeviceVolume) DeepCopy

func (in *DeviceVolume) DeepCopy() *DeviceVolume

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

func (*DeviceVolume) DeepCopyInto

func (in *DeviceVolume) DeepCopyInto(out *DeviceVolume)

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

func (*DeviceVolume) DeepCopyObject

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

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

type DeviceVolumeList

type DeviceVolumeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []DeviceVolume `json:"items"`
}

DeviceVolumeList is a list of DeviceVolume resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +resource:path=devicevolumes

func (*DeviceVolumeList) DeepCopy

func (in *DeviceVolumeList) DeepCopy() *DeviceVolumeList

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

func (*DeviceVolumeList) DeepCopyInto

func (in *DeviceVolumeList) DeepCopyInto(out *DeviceVolumeList)

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

func (*DeviceVolumeList) DeepCopyObject

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

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

type VolStatus

type VolStatus struct {
	// State specifies the current state of the volume provisioning request.
	// The state "Pending" means that the volume creation request has not
	// processed yet. The state "Ready" means that the volume has been created
	// and it is ready for the use.
	// +kubebuilder:validation:Enum=Pending;Ready;Failed
	State string `json:"state,omitempty"`

	// Error denotes the error occurred during provisioning a volume.
	// Error field should only be set when State becomes Failed.
	Error *VolumeError `json:"error,omitempty"`
}

VolStatus string that specifies the current state of the volume provisioning request.

func (*VolStatus) DeepCopy

func (in *VolStatus) DeepCopy() *VolStatus

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

func (*VolStatus) DeepCopyInto

func (in *VolStatus) DeepCopyInto(out *VolStatus)

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

type VolumeError

type VolumeError struct {
	Code    VolumeErrorCode `json:"code,omitempty"`
	Message string          `json:"message,omitempty"`
}

VolumeError specifies the error occurred during volume provisioning.

func (*VolumeError) DeepCopy

func (in *VolumeError) DeepCopy() *VolumeError

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

func (*VolumeError) DeepCopyInto

func (in *VolumeError) DeepCopyInto(out *VolumeError)

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

func (*VolumeError) Error added in v0.6.0

func (e *VolumeError) Error() string

type VolumeErrorCode

type VolumeErrorCode string

VolumeErrorCode represents the error code to represent specific class of errors.

const (
	// Internal represents system internal error.
	Internal VolumeErrorCode = "Internal"
	// InsufficientCapacity represent device doesn't
	// have enough capacity to fit the volume request.
	InsufficientCapacity VolumeErrorCode = "InsufficientCapacity"
)

type VolumeInfo

type VolumeInfo struct {

	// OwnerNodeID is the Node ID where the ZPOOL is running which is where
	// the volume has been provisioned.
	// OwnerNodeID can not be edited after the volume has been provisioned.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Required
	OwnerNodeID string `json:"ownerNodeID"`

	// Capacity of the volume
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Capacity string `json:"capacity"`

	// device name
	// this is the name that will be stored on the meta partition on the disk
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	DevName string `json:"devname"`
}

VolumeInfo defines Device info

func (*VolumeInfo) DeepCopy

func (in *VolumeInfo) DeepCopy() *VolumeInfo

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

func (*VolumeInfo) DeepCopyInto

func (in *VolumeInfo) DeepCopyInto(out *VolumeInfo)

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