Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the localstorage v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor.io
Package v1alpha1 contains v1alpha1 API versions.
This file ensures Go source parsers acknowledge the v1alpha1 package and any child packages. It can be removed if any other Go source files are added to this package.
Package v1alpha1 contains API Schema definitions for the localstorage v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=hwameistor.io
Index ¶
- Constants
- Variables
- func AddToScheme(s *runtime.Scheme) error
- func IsStringArraysEqual(arr1, arr2 []string) bool
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type AccessibilityTopology
- type Action
- type ConditionStatus
- type DRBDSystemConfig
- type DevLinkType
- type Disk
- type DiskAttributes
- type DiskClaimDescription
- type DiskClaimStatus
- type Event
- type EventList
- type EventRecord
- type EventSpec
- type EventStatus
- type FileSystemInfo
- type HAState
- type LocalDevice
- type LocalDisk
- type LocalDiskAction
- type LocalDiskActionList
- type LocalDiskActionRule
- type LocalDiskActionSpec
- type LocalDiskActionStatus
- type LocalDiskAssignFailReason
- type LocalDiskClaim
- type LocalDiskClaimEventReason
- type LocalDiskClaimList
- type LocalDiskClaimSpec
- type LocalDiskClaimSpecArray
- type LocalDiskClaimState
- type LocalDiskClaimStatus
- type LocalDiskEventReason
- type LocalDiskList
- type LocalDiskNode
- type LocalDiskNodeList
- type LocalDiskNodeSpec
- type LocalDiskNodeStatus
- type LocalDiskSpec
- type LocalDiskState
- type LocalDiskStatus
- type LocalDiskVolume
- type LocalDiskVolumeList
- type LocalDiskVolumeSpec
- type LocalDiskVolumeStatus
- type LocalPool
- type LocalStorageNode
- type LocalStorageNodeList
- type LocalStorageNodeSpec
- type LocalStorageNodeStatus
- type LocalVolume
- func (in *LocalVolume) DeepCopy() *LocalVolume
- func (in *LocalVolume) DeepCopyInto(out *LocalVolume)
- func (in *LocalVolume) DeepCopyObject() runtime.Object
- func (v *LocalVolume) IsHighAvailability() bool
- func (v *LocalVolume) SetReplicas(replicas []*LocalVolumeReplica)
- func (v *LocalVolume) UpdateAccessibilityNodesFromReplicas()
- type LocalVolumeConvert
- type LocalVolumeConvertList
- type LocalVolumeConvertSpec
- type LocalVolumeConvertStatus
- type LocalVolumeExpand
- type LocalVolumeExpandList
- type LocalVolumeExpandSpec
- type LocalVolumeExpandStatus
- type LocalVolumeGroup
- type LocalVolumeGroupList
- type LocalVolumeGroupSpec
- type LocalVolumeGroupStatus
- type LocalVolumeList
- type LocalVolumeMigrate
- type LocalVolumeMigrateList
- type LocalVolumeMigrateSpec
- type LocalVolumeMigrateStatus
- type LocalVolumeReplica
- type LocalVolumeReplicaList
- type LocalVolumeReplicaSnapshot
- type LocalVolumeReplicaSnapshotList
- type LocalVolumeReplicaSnapshotRestore
- type LocalVolumeReplicaSnapshotRestoreList
- type LocalVolumeReplicaSnapshotRestoreSpec
- type LocalVolumeReplicaSnapshotRestoreStatus
- type LocalVolumeReplicaSnapshotSpec
- type LocalVolumeReplicaSnapshotStatus
- type LocalVolumeReplicaSpec
- type LocalVolumeReplicaStatus
- type LocalVolumeSnapshot
- type LocalVolumeSnapshotList
- type LocalVolumeSnapshotRestore
- type LocalVolumeSnapshotRestoreList
- type LocalVolumeSnapshotRestoreSpec
- type LocalVolumeSnapshotRestoreStatus
- type LocalVolumeSnapshotSpec
- type LocalVolumeSnapshotStatus
- type LocalVolumeSpec
- type LocalVolumeStatus
- type MountPoint
- type NodeConfig
- type PartitionInfo
- type Phase
- type RAIDInfo
- type ResizePolicy
- type ResizePolicyList
- type ResizePolicySpec
- type ResizePolicyStatus
- type RestoreType
- type SmartAssessResult
- type SmartInfo
- type State
- type StorageNodeCondition
- type StorageNodeConditionType
- type SystemConfig
- type SystemMode
- type Topology
- type VolumeAccessMode
- type VolumeAccessType
- type VolumeCapability
- type VolumeConfig
- type VolumeGroupManager
- type VolumeInfo
- type VolumeQoS
- type VolumeReplica
- type VolumeScheduler
- type VolumeSnapshotAttr
Constants ¶
const ( LocalStorage = "local-storage" LocalDiskManager = "local-disk-manager" System = "system" // LocalDiskObjectPrefix is used to prefix LocalDisk objects LocalDiskObjectPrefix = "localdisk-" )
const ( VolumeCapability_AccessType_Block = "Block" VolumeCapability_AccessType_Mount = "Mount" )
const ( VolumeMigrateCompletedAnnoKey = "hwameistor.io/volume-migrate-state" MigrateStarted = "migrateStarted" MigrateCompleted = "migrateCompleted" )
const ( SourceVolumeSnapshotAnnoKey = "hwameistor.io/source-snapshot" VolumeSnapshotRestoreCompletedAnnoKey = "hwameistor.io/snapshot-restore-completed" )
const ( NodeStateReady State = "Ready" NodeStateMaintain State = "Maintain" NodeStateOffline State = "Offline" VolumeStateToBeUnmount State = "ToBeMounted" VolumeStateEmpty State = "" VolumeStateCreated State = "Created" VolumeStateCreating State = "Creating" VolumeStateReady State = "Ready" VolumeStateNotReady State = "NotReady" VolumeStateToBeDeleted State = "ToBeDeleted" VolumeStateDeleted State = "Deleted" VolumeReplicaStateInvalid State = "Invalid" VolumeReplicaStateCreating State = "Creating" VolumeReplicaStateReady State = "Ready" VolumeReplicaStateNotReady State = "NotReady" VolumeReplicaStateToBeDeleted State = "ToBeDeleted" VolumeReplicaStateDeleted State = "Deleted" // ha replica state HAVolumeReplicaStateConsistent State = "Consistent" HAVolumeReplicaStateInconsistent State = "Inconsistent" HAVolumeReplicaStateUp State = "Up" HAVolumeReplicaStateDown State = "Down" // purpose of the following CRDs is for operational job, // so, they will be in different state machine from volume/volumereplica OperationStateSubmitted State = "Submitted" OperationStateMigrateAddReplica State = "AddReplica" OperationStateMigrateSyncReplica State = "SyncReplica" OperationStateMigratePruneReplica State = "PruneReplica" OperationStateInProgress State = "InProgress" OperationStateCompleted State = "Completed" OperationStateToBeAborted State = "ToBeAborted" OperationStateAborting State = "Cancelled" OperationStateAborted State = "Aborted" OperationStateFailed State = "Failed" DiskStateAvailable State = "Available" DiskStateInUse State = "InUse" DiskStateOffline State = "Offline" LVMVolumeMaxCount int64 = 1000 RAMVolumeMaxCount int64 = 1000 VolumeKindLVM = "LVM" VolumeExpansionCapacityBytesMin int64 = 10 * 1024 * 1024 // 10MiB StoragePoolCapacityThresholdRatio = 0.85 VolumeMigratePhaseMove Phase = "Move" VolumeMigratePhasePrune Phase = "Prune" )
states
const ( DiskClassNameHDD = "HDD" DiskClassNameSSD = "SSD" DiskClassNameNVMe = "NVMe" )
disk class
const ( PoolNamePrefix = "LocalStorage_Pool" PoolNameForHDD = PoolNamePrefix + DiskClassNameHDD PoolNameForSSD = PoolNamePrefix + DiskClassNameSSD PoolNameForNVMe = PoolNamePrefix + DiskClassNameNVMe PoolTypeRegular = "REGULAR" )
consts
const ( VolumeParameterPoolClassKey = "poolClass" VolumeParameterPoolTypeKey = "poolType" VolumeParameterReplicaNumberKey = "replicaNumber" VolumeParameterFSTypeKey = "csi.storage.k8s.io/fstype" VolumeParameterConvertible = "convertible" VolumeParameterThroughput = "provision-throughput-on-creation" VolumeParameterIOPS = "provision-iops-on-creation" )
consts
const ( CSIDriverName = "lvm.hwameistor.io" VendorName = "hwameistor.io" )
misc
const ( DiskDevRootPath = "/etc/hwameistor" AssigedDiskPool = DiskDevRootPath + "/LocalStorage_DiskPool" AssigedDiskPoolHDD = AssigedDiskPool + DiskClassNameHDD AssigedDiskPoolSSD = AssigedDiskPool + DiskClassNameSSD AssigedDiskPoolNVMe = AssigedDiskPool + DiskClassNameNVMe )
localstorage local storage dev paths
const (
SnapshotParameterSizeKey = "snapsize"
)
const (
SnapshotRestoringFinalizer = "provisioner.hwameistor.io/restoring-protection"
)
const (
StorageIPv4AddressAnnotationKeyEnv = "NODE_ANNOTATION_KEY_STORAGE_IPV4"
)
k8snode
const ( // Can only be published once as read/write on a single node, at // any given time. VolumeCapability_AccessMode_SINGLE_NODE_WRITER = csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "hwameistor.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme for Local Storage Member SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var AddToSchemes runtime.SchemeBuilder
AddToSchemes may be used to add all resources defined in the project to a Scheme for Local Storage Member
Functions ¶
func AddToScheme ¶
AddToScheme adds all Resources to the Scheme for Local Storage Member
func IsStringArraysEqual ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AccessibilityTopology ¶
type AccessibilityTopology struct { // Nodes is the collection of storage nodes the volume replicas must locate at Nodes []string `json:"nodes,omitempty"` // zones where the volume replicas should be distributed across, it's Optional // +kubebuilder:default:={default} Zones []string `json:"zones,omitempty"` // regions where the volume replicas should be distributed across, it's Optional // +kubebuilder:default:={default} Regions []string `json:"regions,omitempty"` }
AccessibilityTopology of the volume
func (*AccessibilityTopology) DeepCopy ¶
func (in *AccessibilityTopology) DeepCopy() *AccessibilityTopology
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessibilityTopology.
func (*AccessibilityTopology) DeepCopyInto ¶
func (in *AccessibilityTopology) DeepCopyInto(out *AccessibilityTopology)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AccessibilityTopology) Equal ¶
func (at *AccessibilityTopology) Equal(peer *AccessibilityTopology) bool
type Action ¶
type Action string
+kubebuilder:validation:Enum=reserve
const LocalDiskActionReserve Action = "reserve"
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.
type DRBDSystemConfig ¶
DRBDSystemConfig of HA module
func (*DRBDSystemConfig) DeepCopy ¶
func (in *DRBDSystemConfig) DeepCopy() *DRBDSystemConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DRBDSystemConfig.
func (*DRBDSystemConfig) DeepCopyInto ¶
func (in *DRBDSystemConfig) DeepCopyInto(out *DRBDSystemConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DevLinkType ¶
type DevLinkType = string
const ( // LinkByPath is used to identify by-path symbolic link LinkByPath DevLinkType = "by-path" // LinkByID is used to identify by-id symbolic link LinkByID DevLinkType = "by-id" // LinkByUUID is used to identify by-uuid symbolic link LinkByUUID DevLinkType = "by-uuid" )
type Disk ¶
type Disk struct { // DevPath DevPath string `json:"devPath"` // Capacity Capacity int64 `json:"capacity,omitempty"` // DiskType SSD/HDD/NVME... DiskType string `json:"diskType"` // Status Status string `json:"status"` }
func (*Disk) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Disk.
func (*Disk) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskAttributes ¶
type DiskAttributes struct { // Type is the disk type, such as ata, scsi, nvme, megaraid,N, ... Type string `json:"type,omitempty"` // DeviceType represents the type of device like // sparse, disk, partition, lvm, crypt DevType string `json:"devType,omitempty"` // Vendor is who provides the disk Vendor string `json:"vendor,omitempty"` // Product is a class of disks the vendor produces Product string `json:"product,omitempty"` // PCIVendorID is the ID of the PCI vendor, for NVMe disk only PCIVendorID string `json:"pciVendorID,omitempty"` // ModelName is the name of disk model ModelName string `json:"modelName,omitempty"` // SerialNumber is a unique number assigned to a disk SerialNumber string `json:"serialNumber,omitempty"` // FormFactor is the disk size, like 2.5 inches FormFactor string `json:"formFactor,omitempty"` // RotationRate is the rate of the disk rotation RotationRate int64 `json:"rotationRate,omitempty"` // Protocol is for data transport, such as ATA, SCSI, NVMe Protocol string `json:"protocol,omitempty"` }
DiskAttributes represent certain hardware/static attributes of the disk
func (*DiskAttributes) DeepCopy ¶
func (in *DiskAttributes) DeepCopy() *DiskAttributes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskAttributes.
func (*DiskAttributes) DeepCopyInto ¶
func (in *DiskAttributes) DeepCopyInto(out *DiskAttributes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskClaimDescription ¶
type DiskClaimDescription struct { // DiskType represents the type of drive like SSD, HDD etc., // +optional DiskType string `json:"diskType,omitempty"` // Capacity of the disk in bytes Capacity int64 `json:"capacity,omitempty"` // Match the name of Localdisk // LocalDiskNames match all disks if LocalDiskNames are empty LocalDiskNames []string `json:"localDiskNames,omitempty"` // Match the device path of Localdisk // DevicePaths match all disks if DevicePaths are empty DevicePaths []string `json:"devicePaths,omitempty"` }
DiskClaimDescription defines the details of the disk that should be claimed
func (*DiskClaimDescription) DeepCopy ¶
func (in *DiskClaimDescription) DeepCopy() *DiskClaimDescription
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskClaimDescription.
func (*DiskClaimDescription) DeepCopyInto ¶
func (in *DiskClaimDescription) DeepCopyInto(out *DiskClaimDescription)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskClaimStatus ¶
type DiskClaimStatus string
DiskClaimStatus is a typed string for phase field of BlockDeviceClaim.
const ( // LocalDiskClaimStatusEmpty represents that the LocalDiskClaim was just created. DiskClaimStatusEmpty DiskClaimStatus = "" // LocalDiskClaimStatusPending represents LocalDiskClaim has not been assigned devices yet. Rather // search is going on for matching disks. LocalDiskClaimStatusPending DiskClaimStatus = "Pending" // LocalDiskClaimStatusExtending represents LocalDiskClaim has been assigned devices yet, but need more disks. // Rather search is going on for matching disks. LocalDiskClaimStatusExtending DiskClaimStatus = "Extending" // LocalDiskClaimStatusBound represents LocalDiskClaim has been assigned backing disk and ready for use. LocalDiskClaimStatusBound DiskClaimStatus = "Bound" // LocalDiskClaimStatusConsumed represents disks backing this LocalDiskClaim is consumed by the consumer LocalDiskClaimStatusConsumed DiskClaimStatus = "Consumed" // LocalDiskClaimStatusToBeDeleted represents disks backing this LocalDiskClaim is consumed already and the claim // will be deleted after some clean job done LocalDiskClaimStatusToBeDeleted DiskClaimStatus = "ToBeDeleted" // LocalDiskClaimStatusDeleted represents disks backing this LocalDiskClaim can be deleted LocalDiskClaimStatusDeleted DiskClaimStatus = "Deleted" )
LocalDiskClaim CR, when created pass through phases before it got some Disks Assigned.
type Event ¶
type Event struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EventSpec `json:"spec,omitempty"` Status EventStatus `json:"status,omitempty"` }
Event is the Schema for the events API +kubebuilder:subresource:status +kubebuilder:resource:path=events,scope=Cluster,shortName=evt +kubebuilder:printcolumn:JSONPath=".spec.resourceType",name=type,type=string +kubebuilder:printcolumn:JSONPath=".spec.resourceName",name=resource,type=string
func (*Event) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event.
func (*Event) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Event) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EventList ¶
type EventList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Event `json:"items"` }
EventList contains a list of Event
func (*EventList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList.
func (*EventList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EventList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EventRecord ¶
type EventRecord struct { // The time when does the action happen Time metav1.Time `json:"time,omitempty"` // id is unique ID string `json:"id,omitempty"` // The action is the operation on the resource, such as Migrate a LocalVolume Action string `json:"action,omitempty"` // The content of the action which is a JSON string ActionContent string `json:"actionContent,omitempty"` // The state of the action State string `json:"state,omitempty"` // The content of the action state which is a JSON string StateContent string `json:"stateContent,omitempty"` }
func (*EventRecord) DeepCopy ¶
func (in *EventRecord) DeepCopy() *EventRecord
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventRecord.
func (*EventRecord) DeepCopyInto ¶
func (in *EventRecord) DeepCopyInto(out *EventRecord)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EventSpec ¶
type EventSpec struct { // HwameiStor resource type: Cluster, LocalStorageNode, LocalDiskNode, Pool, LocalVolume, LocalDiskVolume, LocalDisk, // +kubebuilder:validation:Enum:=Cluster;StorageNode;DiskNode;Pool;Volume;DiskVolume;Disk ResourceType string `json:"resourceType"` // Name of the resource ResourceName string `json:"resourceName"` Records []EventRecord `json:"records"` }
EventSpec defines the desired state of Event
func (*EventSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventSpec.
func (*EventSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EventStatus ¶
type EventStatus struct { }
EventStatus defines the observed state of Event
func (*EventStatus) DeepCopy ¶
func (in *EventStatus) DeepCopy() *EventStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventStatus.
func (*EventStatus) DeepCopyInto ¶
func (in *EventStatus) DeepCopyInto(out *EventStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileSystemInfo ¶
type FileSystemInfo struct { // Type represents the FileSystem type of the disk // +optional Type string `json:"fsType,omitempty"` // MountPoint represents the mountpoint of the disk // +optional Mountpoint string `json:"mountPoint,omitempty"` }
FileSystemInfo defines the filesystem type and mountpoint of the disk if it exists
func (*FileSystemInfo) DeepCopy ¶
func (in *FileSystemInfo) DeepCopy() *FileSystemInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileSystemInfo.
func (*FileSystemInfo) DeepCopyInto ¶
func (in *FileSystemInfo) DeepCopyInto(out *FileSystemInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HAState ¶
type HAState struct { // Consistent, Inconsistent, replica is ready only when consistent State State `json:"state"` // Reason is why this state happened Reason string `json:"reason,omitempty"` }
HAState is state for ha replica
func (*HAState) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HAState.
func (*HAState) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDevice ¶
type LocalDevice struct { // e.g. /dev/sdb DevPath string `json:"devPath,omitempty"` // Supported: HDD, SSD, NVMe, RAM Class string `json:"type,omitempty"` // disk capacity CapacityBytes int64 `json:"capacityBytes,omitempty"` // Possible state: Available, Inuse, Offline State State `json:"state,omitempty"` }
LocalDevice is disk struct
func (*LocalDevice) DeepCopy ¶
func (in *LocalDevice) DeepCopy() *LocalDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDevice.
func (*LocalDevice) DeepCopyInto ¶
func (in *LocalDevice) DeepCopyInto(out *LocalDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDisk ¶
type LocalDisk struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalDiskSpec `json:"spec,omitempty"` Status LocalDiskStatus `json:"status,omitempty"` }
LocalDisk is the Schema for the localdisks API +kubebuilder:resource:scope=Cluster,shortName=ld +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=".spec.nodeName",name=NodeMatch,type=string +kubebuilder:printcolumn:JSONPath=".spec.capacity",name=Capacity,type=integer,priority=1 +kubebuilder:printcolumn:JSONPath=".spec.preNodeName",name=PreNodeMatch,type=string,priority=1 +kubebuilder:printcolumn:JSONPath=".spec.devicePath",name=DevicePath,type=string +kubebuilder:printcolumn:JSONPath=".spec.preDevicePath",name=PreDevicePath,type=string,priority=1 +kubebuilder:printcolumn:JSONPath=".spec.owner",name=Owner,type=string +kubebuilder:printcolumn:JSONPath=".status.claimState",name=Phase,type=string +kubebuilder:printcolumn:JSONPath=".spec.smartInfo.overallHealth",name=Health,type=string,priority=1 +kubebuilder:printcolumn:JSONPath=".spec.reserved",name=Reserved,type=boolean,priority=1 +kubebuilder:printcolumn:JSONPath=".spec.state",name=State,type=string +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalDisk) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDisk.
func (*LocalDisk) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDisk) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskAction ¶
type LocalDiskAction struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalDiskActionSpec `json:"spec,omitempty"` Status LocalDiskActionStatus `json:"status,omitempty"` }
LocalDiskAction is the Schema for the localdiskactions API +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=lda +kubebuilder:printcolumn:JSONPath=".spec.action",name=Action,type=string +kubebuilder:printcolumn:JSONPath=".spec.rule.maxCapacity",name=MaxCapacity,type=integer +kubebuilder:printcolumn:JSONPath=".spec.rule.minCapacity",name=MinCapacity,type=integer +kubebuilder:printcolumn:JSONPath=".spec.rule.devicePath",name=DevicePath,type=string
func (*LocalDiskAction) DeepCopy ¶
func (in *LocalDiskAction) DeepCopy() *LocalDiskAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskAction.
func (*LocalDiskAction) DeepCopyInto ¶
func (in *LocalDiskAction) DeepCopyInto(out *LocalDiskAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskAction) DeepCopyObject ¶
func (in *LocalDiskAction) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskActionList ¶
type LocalDiskActionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalDiskAction `json:"items"` }
LocalDiskActionList contains a list of LocalDiskAction
func (*LocalDiskActionList) DeepCopy ¶
func (in *LocalDiskActionList) DeepCopy() *LocalDiskActionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskActionList.
func (*LocalDiskActionList) DeepCopyInto ¶
func (in *LocalDiskActionList) DeepCopyInto(out *LocalDiskActionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskActionList) DeepCopyObject ¶
func (in *LocalDiskActionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskActionRule ¶
type LocalDiskActionRule struct { // Device capacity should less than this value // +optional MaxCapacity int64 `json:"maxCapacity,omitempty"` // Device capacity should larger than this value // +optional MinCapacity int64 `json:"minCapacity,omitempty"` // Matched by glob, e.g. /dev/rbd* // +optional DevicePath string `json:"devicePath,omitempty"` }
LocalDiskActionSpec defines the desired state of LocalDiskAction
func (*LocalDiskActionRule) DeepCopy ¶
func (in *LocalDiskActionRule) DeepCopy() *LocalDiskActionRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskActionRule.
func (*LocalDiskActionRule) DeepCopyInto ¶
func (in *LocalDiskActionRule) DeepCopyInto(out *LocalDiskActionRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskActionSpec ¶
type LocalDiskActionSpec struct { // +optional Rule LocalDiskActionRule `json:"rule,omitempty"` // +kubebuilder:validation:Required Action Action `json:"action"` }
LocalDiskActionSpec defines the desired state of LocalDiskAction
func (*LocalDiskActionSpec) DeepCopy ¶
func (in *LocalDiskActionSpec) DeepCopy() *LocalDiskActionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskActionSpec.
func (*LocalDiskActionSpec) DeepCopyInto ¶
func (in *LocalDiskActionSpec) DeepCopyInto(out *LocalDiskActionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskActionStatus ¶
type LocalDiskActionStatus struct { // latest matched local disks LatestMatchedLds []string `json:"latestMatchedLds,omitempty"` }
LocalDiskActionStatus defines the observed state of LocalDiskAction
func (*LocalDiskActionStatus) DeepCopy ¶
func (in *LocalDiskActionStatus) DeepCopy() *LocalDiskActionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskActionStatus.
func (*LocalDiskActionStatus) DeepCopyInto ¶
func (in *LocalDiskActionStatus) DeepCopyInto(out *LocalDiskActionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskAssignFailReason ¶
type LocalDiskAssignFailReason = string
const ( LocalDiskAssignFailReasonHasPartition LocalDiskAssignFailReason = "LocalDiskAlreadyHasPartition" LocalDiskAssignFailReasonUnAvailable LocalDiskAssignFailReason = "LocalDiskUnAvailable" LocalDiskAssignFailReasonOwnerUnMatch LocalDiskAssignFailReason = "LocalDiskOwnerUnMatch" LocalDiskAssignFailReasonInsufficientCapacity LocalDiskAssignFailReason = "LocalDiskInsufficientCapacity" LocalDiskAssignFailReasonDiskTypeUnMatch LocalDiskAssignFailReason = "LocalDiskTypeUnMatch" LocalDiskAssignFailReasonLocalDiskNameUnMatch LocalDiskAssignFailReason = "LocalDiskNameUnMatch" LocalDiskAssignFailReasonDevPathUnMatch LocalDiskAssignFailReason = "LocalDiskDevPathUnMatch" LocalDiskAssignFailReasonHasReserved LocalDiskAssignFailReason = "LocalDiskHasReserved" LocalDiskAssignFailReasonLocalDiskNameFormatUnMatch LocalDiskAssignFailReason = "LocalDiskNameFormatUnMatch" LocalDiskAssignFailReasonNodeUnMatch LocalDiskAssignFailReason = "LocalDiskNodeUnMatch" LocalDiskAssignFailReasonDiskIsNotBlockDevice LocalDiskAssignFailReason = "LocalDiskIsNotBlockDevice" )
type LocalDiskClaim ¶
type LocalDiskClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalDiskClaimSpec `json:"spec,omitempty"` Status LocalDiskClaimStatus `json:"status,omitempty"` }
LocalDiskClaim is the Schema for the localdiskclaims API +kubebuilder:validation:Required +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=".spec.nodeName",name=NodeMatch,type=string +kubebuilder:printcolumn:JSONPath=".status.status",name=Phase,type=string +kubebuilder:printcolumn:JSONPath=".spec.owner",name=Owner,type=string +kubebuilder:resource:scope=Cluster,shortName=ldc
func (*LocalDiskClaim) DeepCopy ¶
func (in *LocalDiskClaim) DeepCopy() *LocalDiskClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskClaim.
func (*LocalDiskClaim) DeepCopyInto ¶
func (in *LocalDiskClaim) DeepCopyInto(out *LocalDiskClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskClaim) DeepCopyObject ¶
func (in *LocalDiskClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskClaimEventReason ¶
type LocalDiskClaimEventReason = string
const ( LocalDiskClaimEventReasonBound LocalDiskClaimEventReason = "LocalDiskClaimBound" LocalDiskClaimEventReasonBoundFail LocalDiskClaimEventReason = "LocalDiskClaimBoundFail" LocalDiskClaimEventReasonAssign LocalDiskClaimEventReason = "LocalDiskClaimAssign" LocalDiskClaimEventReasonAssignFail LocalDiskClaimEventReason = "LocalDiskClaimAssignFail" LocalDiskClaimEventReasonExtendFail LocalDiskClaimEventReason = "LocalDiskClaimExtendFail" LocalDiskClaimEventReasonExtend LocalDiskClaimEventReason = "LocalDiskClaimExtend" LocalDiskClaimEventReasonConsumed LocalDiskClaimEventReason = "LocalDiskClaimConsumed" LocalDiskClaimEventReasonConsumedFail LocalDiskClaimEventReason = "LocalDiskClaimConsumedFail" )
type LocalDiskClaimList ¶
type LocalDiskClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalDiskClaim `json:"items"` }
LocalDiskClaimList contains a list of LocalDiskClaim
func (*LocalDiskClaimList) DeepCopy ¶
func (in *LocalDiskClaimList) DeepCopy() *LocalDiskClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskClaimList.
func (*LocalDiskClaimList) DeepCopyInto ¶
func (in *LocalDiskClaimList) DeepCopyInto(out *LocalDiskClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskClaimList) DeepCopyObject ¶
func (in *LocalDiskClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskClaimSpec ¶
type LocalDiskClaimSpec struct { // +kubebuilder:validation:Required // NodeName represents where disk has to be claimed. NodeName string `json:"nodeName"` // Description of the disk to be claimed // +optional Description DiskClaimDescription `json:"description,omitempty"` // DiskRefs represents which disks are assigned to the LocalDiskClaim // +optional DiskRefs []*v1.ObjectReference `json:"diskRefs,omitempty"` // Owner represents which system owns this claim(e.g. local-storage, local-disk-manager) // +kubebuilder:validation:Required Owner string `json:"owner"` }
LocalDiskClaimSpec defines the desired state of LocalDiskClaim
func (*LocalDiskClaimSpec) DeepCopy ¶
func (in *LocalDiskClaimSpec) DeepCopy() *LocalDiskClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskClaimSpec.
func (*LocalDiskClaimSpec) DeepCopyInto ¶
func (in *LocalDiskClaimSpec) DeepCopyInto(out *LocalDiskClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskClaimSpecArray ¶
type LocalDiskClaimSpecArray []LocalDiskClaimSpec
func (LocalDiskClaimSpecArray) DeepCopy ¶
func (in LocalDiskClaimSpecArray) DeepCopy() LocalDiskClaimSpecArray
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskClaimSpecArray.
func (LocalDiskClaimSpecArray) DeepCopyInto ¶
func (in LocalDiskClaimSpecArray) DeepCopyInto(out *LocalDiskClaimSpecArray)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskClaimState ¶
type LocalDiskClaimState string
LocalDiskClaimState defines the observed state of LocalDisk
const ( // LocalDiskUnclaimed represents that the disk is not bound to any LDC, // and is available for claiming. LocalDiskUnclaimed LocalDiskClaimState = "Available" // LocalDiskReleased represents that the disk is released from the LDC, LocalDiskReleased LocalDiskClaimState = "Released" // LocalDiskClaimed represents that the disk is bound to a LDC LocalDiskClaimed LocalDiskClaimState = "Claimed" // LocalDiskInUse represents that the disk is in use but not claimed by a LDC LocalDiskInUse LocalDiskClaimState = "Inuse" )
type LocalDiskClaimStatus ¶
type LocalDiskClaimStatus struct { // Status represents the current statue of the claim // +kubebuilder:validation:Enum:=Bound;Pending;Extending;Consumed;ToBeDeleted;Deleted Status DiskClaimStatus `json:"status,omitempty"` }
LocalDiskClaimStatus defines the observed state of LocalDiskClaim
func (*LocalDiskClaimStatus) DeepCopy ¶
func (in *LocalDiskClaimStatus) DeepCopy() *LocalDiskClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskClaimStatus.
func (*LocalDiskClaimStatus) DeepCopyInto ¶
func (in *LocalDiskClaimStatus) DeepCopyInto(out *LocalDiskClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskEventReason ¶
type LocalDiskEventReason = string
const ( LocalDiskEventReasonAvailable LocalDiskEventReason = "LocalDiskAvailable" LocalDiskEventReasonAvailableFail LocalDiskEventReason = "LocalDiskAvailableFail" LocalDiskEventReasonRelease LocalDiskEventReason = "LocalDiskRelease" LocalDiskEventReasonReleaseFail LocalDiskEventReason = "LocalDiskReleaseFail" LocalDiskEventReasonBound LocalDiskEventReason = "LocalDiskBound" LocalDiskEventReasonBoundFail LocalDiskEventReason = "LocalDiskBoundFail" LocalDiskEventReasonReserved LocalDiskEventReason = "LocalDiskReserved" LocalDiskEventReasonReservedFail LocalDiskEventReason = "LocalDiskReservedFail" LocalDiskEventReasonPending LocalDiskEventReason = "LocalDiskPending" LocalDiskEventReasonPendingFail LocalDiskEventReason = "LocalDiskPendingFail" )
type LocalDiskList ¶
type LocalDiskList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalDisk `json:"items"` }
LocalDiskList contains a list of LocalDisk
func (*LocalDiskList) DeepCopy ¶
func (in *LocalDiskList) DeepCopy() *LocalDiskList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskList.
func (*LocalDiskList) DeepCopyInto ¶
func (in *LocalDiskList) DeepCopyInto(out *LocalDiskList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskList) DeepCopyObject ¶
func (in *LocalDiskList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskNode ¶
type LocalDiskNode struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalDiskNodeSpec `json:"spec,omitempty"` Status LocalDiskNodeStatus `json:"status,omitempty"` }
LocalDiskNode is the Schema for the localdisknodes API +kubebuilder:subresource:status +kubebuilder:resource:path=localdisknodes,scope=Cluster,shortName=ldn +kubebuilder:printcolumn:JSONPath=".status.freeCapacity",name=FreeCapacity,type=integer +kubebuilder:printcolumn:JSONPath=".status.totalCapacity",name=TotalCapacity,type=integer +kubebuilder:printcolumn:JSONPath=".status.totalDisk",name=TotalDisk,type=integer +kubebuilder:printcolumn:name="status",type=string,JSONPath=`.status.state`,description="State of the LocalDisk Node" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalDiskNode) DeepCopy ¶
func (in *LocalDiskNode) DeepCopy() *LocalDiskNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskNode.
func (*LocalDiskNode) DeepCopyInto ¶
func (in *LocalDiskNode) DeepCopyInto(out *LocalDiskNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskNode) DeepCopyObject ¶
func (in *LocalDiskNode) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskNodeList ¶
type LocalDiskNodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalDiskNode `json:"items"` }
LocalDiskNodeList contains a list of LocalDiskNode
func (*LocalDiskNodeList) DeepCopy ¶
func (in *LocalDiskNodeList) DeepCopy() *LocalDiskNodeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskNodeList.
func (*LocalDiskNodeList) DeepCopyInto ¶
func (in *LocalDiskNodeList) DeepCopyInto(out *LocalDiskNodeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskNodeList) DeepCopyObject ¶
func (in *LocalDiskNodeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskNodeSpec ¶
type LocalDiskNodeSpec struct { // NodeName represent where disk is attached NodeName string `json:"nodeName"` }
LocalDiskNodeSpec defines the desired state of LocalDiskNode
func (*LocalDiskNodeSpec) DeepCopy ¶
func (in *LocalDiskNodeSpec) DeepCopy() *LocalDiskNodeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskNodeSpec.
func (*LocalDiskNodeSpec) DeepCopyInto ¶
func (in *LocalDiskNodeSpec) DeepCopyInto(out *LocalDiskNodeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskNodeStatus ¶
type LocalDiskNodeStatus struct { // There may have multiple storage pools in a node. // e.g. HDD_POOL, SSD_POOL, NVMe_POOL // Pools: poolName -> LocalPool Pools map[string]LocalPool `json:"pools,omitempty"` // State of the Local Storage Node/Member: New, Active, Inactive, Failed State State `json:"state,omitempty"` // Represents the latest available observations of a localstoragenode's current state. // +optional Conditions []StorageNodeCondition `json:"conditions,omitempty"` // PoolExtendRecords record why disks are joined in the pool // +optional PoolExtendRecords map[string]LocalDiskClaimSpecArray `json:"poolExtendRecords,omitempty"` // TotalDisk TotalDisk int64 `json:"totalDisk,omitempty"` // FreeDisk FreeDisk int64 `json:"freeDisk,omitempty"` // TotalCapacity indicates the capacity of all the disks TotalCapacity int64 `json:"totalCapacity,omitempty"` // FreeCapacity indicates the free capacity of all the disks FreeCapacity int64 `json:"freeCapacity,omitempty"` }
LocalDiskNodeStatus defines the observed state of LocalDiskNode
func (*LocalDiskNodeStatus) DeepCopy ¶
func (in *LocalDiskNodeStatus) DeepCopy() *LocalDiskNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskNodeStatus.
func (*LocalDiskNodeStatus) DeepCopyInto ¶
func (in *LocalDiskNodeStatus) DeepCopyInto(out *LocalDiskNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskSpec ¶
type LocalDiskSpec struct { // NodeName represents the node where the disk is attached // +kubebuilder:validation:Required NodeName string `json:"nodeName"` // PreNodeName represents the node where the disk was attached PreNodeName string `json:"preNodeName,omitempty"` // UUID global unique identifier of the disk UUID string `json:"uuid,omitempty"` // DevicePath is the disk path in the OS DevicePath string `json:"devicePath,omitempty"` // PreDevicePath represents the last device path in the OS PreDevicePath string `json:"preDevicePath,omitempty"` // DevLinks are symbol links for this device DevLinks []string `json:"devLinks"` // Capacity of the disk in bytes Capacity int64 `json:"capacity,omitempty"` // HasPartition represents if the disk has partitions or not HasPartition bool `json:"partitioned,omitempty"` // PartitionInfo contains partition information // +optional PartitionInfo []PartitionInfo `json:"partitionInfo,omitempty"` // HasRAID identifies if the disk is a raid disk or not HasRAID bool `json:"isRaid,omitempty"` // RAIDInfo contains RAID information // +optional RAIDInfo RAIDInfo `json:"raidInfo,omitempty"` // HasSmartInfo identified if the disk supports SMART or not HasSmartInfo bool `json:"supportSmart,omitempty"` // SmartInfo contains infos collected by smartctl // +optional SmartInfo SmartInfo `json:"smartInfo,omitempty"` // DiskAttributes has hardware/static attributes of the disk DiskAttributes DiskAttributes `json:"diskAttributes,omitempty"` // State is the current state of the disk (Active/Inactive/Unknown) // +kubebuilder:validation:Enum:=Active;Inactive;Unknown State LocalDiskState `json:"state,omitempty"` // ClaimRef is the reference to the LDC which has claimed this LD // +optional ClaimRef *v1.ObjectReference `json:"claimRef,omitempty"` // Reserved represents the disk won't be used in hwameistor later, until it becomes unreserved // +optional Reserved bool `json:"reserved,omitempty"` // Owner represents which system owns this claim(e.g. local-storage, local-disk-manager) // +optional Owner string `json:"owner,omitempty"` // Major represents drive used by the device // +optional Major string `json:"major,omitempty"` // Minor is used to distinguish different devices // +optional Minor string `json:"minor,omitempty"` }
LocalDiskSpec defines the desired state of LocalDisk
func (*LocalDiskSpec) DeepCopy ¶
func (in *LocalDiskSpec) DeepCopy() *LocalDiskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskSpec.
func (*LocalDiskSpec) DeepCopyInto ¶
func (in *LocalDiskSpec) DeepCopyInto(out *LocalDiskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskState ¶
type LocalDiskState string
LocalDiskState defines the observed state of the local disk
const ( // LocalDiskActive is the state for the disk that is connected LocalDiskActive LocalDiskState = "Active" // LocalDiskInactive is the state for the disk that is disconnected LocalDiskInactive LocalDiskState = "Inactive" // LocalDiskUnknown is the state for the disk that cannot be determined // at this time(whether attached or detached) LocalDiskUnknown LocalDiskState = "Unknown" )
NOTE: The follow-up state represent disk health status detected by system or health check tools(e.g., smartctl)
const ( // LocalDiskEmpty is temporary status, it can be updated to Available or Bound LocalDiskEmpty LocalDiskState = "" // LocalDiskPending is temporary status, it can be updated to Available or Bound LocalDiskPending LocalDiskState = "Pending" // LocalDiskAvailable represents the disk can be used which means: // 1) there is no filesystem or partitions exist // 2) the disk is not bound to any LocalDiskClaim object LocalDiskAvailable LocalDiskState = "Available" // LocalDiskBound represents the disk is used already. // There are follow-up use cases: // 1) used by system (e.g., rootfs) // 2) used by a LocalDiskClaim object // 3) there is already a filesystem or partition exist LocalDiskBound LocalDiskState = "Bound" )
NOTE: The follow-up state represent LocalDisk instance status
type LocalDiskStatus ¶
type LocalDiskStatus struct { // State represents the claim state of the disk // +kubebuilder:validation:Enum:=Bound;Reserved;Available;Pending State LocalDiskState `json:"claimState,omitempty"` }
LocalDiskStatus defines the observed state of LocalDisk
func (*LocalDiskStatus) DeepCopy ¶
func (in *LocalDiskStatus) DeepCopy() *LocalDiskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskStatus.
func (*LocalDiskStatus) DeepCopyInto ¶
func (in *LocalDiskStatus) DeepCopyInto(out *LocalDiskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskVolume ¶
type LocalDiskVolume struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalDiskVolumeSpec `json:"spec,omitempty"` Status LocalDiskVolumeStatus `json:"status,omitempty"` }
LocalDiskVolume is the Schema for the localdiskvolumes API +kubebuilder:resource:path=localdiskvolumes,scope=Cluster,shortName=ldv +kubebuilder:printcolumn:JSONPath=".spec.accessibility.nodes[0]",name=Node,type=string +kubebuilder:printcolumn:JSONPath=".status.devPath",name=Disk,type=string +kubebuilder:printcolumn:JSONPath=".status.allocatedCapacityBytes",name=AllocatedCap,type=integer +kubebuilder:printcolumn:JSONPath=".spec.diskType",name=Type,type=string +kubebuilder:printcolumn:JSONPath=".status.state",name=Status,type=string
func (*LocalDiskVolume) DeepCopy ¶
func (in *LocalDiskVolume) DeepCopy() *LocalDiskVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskVolume.
func (*LocalDiskVolume) DeepCopyInto ¶
func (in *LocalDiskVolume) DeepCopyInto(out *LocalDiskVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskVolume) DeepCopyObject ¶
func (in *LocalDiskVolume) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskVolumeList ¶
type LocalDiskVolumeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalDiskVolume `json:"items"` }
LocalDiskVolumeList contains a list of LocalDiskVolume
func (*LocalDiskVolumeList) DeepCopy ¶
func (in *LocalDiskVolumeList) DeepCopy() *LocalDiskVolumeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskVolumeList.
func (*LocalDiskVolumeList) DeepCopyInto ¶
func (in *LocalDiskVolumeList) DeepCopyInto(out *LocalDiskVolumeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalDiskVolumeList) DeepCopyObject ¶
func (in *LocalDiskVolumeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalDiskVolumeSpec ¶
type LocalDiskVolumeSpec struct { // DiskType represents the type of drive like SSD, HDD etc., DiskType string `json:"diskType"` // RequiredCapacityBytes RequiredCapacityBytes int64 `json:"requiredCapacityBytes,omitempty"` // Accessibility is the topology requirement of the volume. It describes how to locate and distribute the volume replicas Accessibility AccessibilityTopology `json:"accessibility,omitempty"` // PersistentVolumeClaimName is the reference of the associated PVC PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"` // CanWipe represents if disk can wipe after Volume is deleted // If disk has been writen data, this is will be changed to true CanWipe bool `json:"canWipe,omitempty"` }
LocalDiskVolumeSpec defines the desired state of LocalDiskVolume
func (*LocalDiskVolumeSpec) DeepCopy ¶
func (in *LocalDiskVolumeSpec) DeepCopy() *LocalDiskVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskVolumeSpec.
func (*LocalDiskVolumeSpec) DeepCopyInto ¶
func (in *LocalDiskVolumeSpec) DeepCopyInto(out *LocalDiskVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalDiskVolumeStatus ¶
type LocalDiskVolumeStatus struct { // LocalDiskName is disk name which is used to create this volume LocalDiskName string `json:"localDiskName,omitempty"` // DevPath is the disk path in the OS DevPath string `json:"devPath"` // VolumePath is the volume path in the OS VolumePath string `json:"volumePath,omitempty"` // DevLinks is the set of symlink of a disk DevLinks map[DevLinkType][]string `json:"devLinks,omitempty"` // AllocatedCapacityBytes is the real allocated capacity in bytes AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // UsedCapacityBytes is the real used capacity in bytes UsedCapacityBytes int64 `json:"usedCapacityBytes,omitempty"` // MountPoints MountPoints []MountPoint `json:"mountPoints,omitempty"` // State is the phase of volume replica, e.g. Creating, Ready, NotReady, ToBeDeleted, Deleted State State `json:"state,omitempty"` }
LocalDiskVolumeStatus defines the observed state of LocalDiskVolume
func (*LocalDiskVolumeStatus) DeepCopy ¶
func (in *LocalDiskVolumeStatus) DeepCopy() *LocalDiskVolumeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalDiskVolumeStatus.
func (*LocalDiskVolumeStatus) DeepCopyInto ¶
func (in *LocalDiskVolumeStatus) DeepCopyInto(out *LocalDiskVolumeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalPool ¶
type LocalPool struct { // Supported pool name: HDD_POOL, SSD_POOL, NVMe_POOL Name string `json:"name,omitempty"` // Supported class: HDD, SSD, NVMe // +kubebuilder:validation:Enum:=HDD;SSD;NVMe Class string `json:"class"` // Supported type: REGULAR // +kubebuilder:validation:Enum:=REGULAR // +kubebuilder:default:=REGULAR Type string `json:"type"` // VG path Path string `json:"path,omitempty"` TotalCapacityBytes int64 `json:"totalCapacityBytes"` UsedCapacityBytes int64 `json:"usedCapacityBytes"` VolumeCapacityBytesLimit int64 `json:"volumeCapacityBytesLimit"` FreeCapacityBytes int64 `json:"freeCapacityBytes"` TotalVolumeCount int64 `json:"totalVolumeCount"` UsedVolumeCount int64 `json:"usedVolumeCount"` FreeVolumeCount int64 `json:"freeVolumeCount"` Disks []LocalDevice `json:"disks,omitempty"` Volumes []string `json:"volumes,omitempty"` }
LocalPool is storage pool struct
func (*LocalPool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalPool.
func (*LocalPool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalStorageNode ¶
type LocalStorageNode struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalStorageNodeSpec `json:"spec,omitempty"` Status LocalStorageNodeStatus `json:"status,omitempty"` }
LocalStorageNode is the Schema for the localstoragenodes API +kubebuilder:subresource:status +kubebuilder:resource:path=localstoragenodes,scope=Cluster,shortName=lsn +kubebuilder:printcolumn:name="ip",type=string,JSONPath=`.spec.storageIP`,description="IPv4 address" +kubebuilder:printcolumn:name="status",type=string,JSONPath=`.status.state`,description="State of the Local Storage Node" +kubebuilder:printcolumn:name="PoolHDD FreeCap",type=integer,JSONPath=`.status.pools.LocalStorage_PoolHDD.freeCapacityBytes`,description="Free Capacity bytes in HDD Pool",priority=1 +kubebuilder:printcolumn:name="PoolSSD FreeCap",type=integer,JSONPath=`.status.pools.LocalStorage_PoolSSD.freeCapacityBytes`,description="Free Capacity bytes in SSD Pool",priority=1 +kubebuilder:printcolumn:name="PoolNVMe FreeCap",type=integer,JSONPath=`.status.pools.LocalStorage_PoolNVMe.freeCapacityBytes`,description="Free Capacity bytes in NVMe Pool",priority=1 +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalStorageNode) DeepCopy ¶
func (in *LocalStorageNode) DeepCopy() *LocalStorageNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorageNode.
func (*LocalStorageNode) DeepCopyInto ¶
func (in *LocalStorageNode) DeepCopyInto(out *LocalStorageNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalStorageNode) DeepCopyObject ¶
func (in *LocalStorageNode) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalStorageNodeList ¶
type LocalStorageNodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalStorageNode `json:"items"` }
LocalStorageNodeList contains a list of LocalStorageNode
func (*LocalStorageNodeList) DeepCopy ¶
func (in *LocalStorageNodeList) DeepCopy() *LocalStorageNodeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorageNodeList.
func (*LocalStorageNodeList) DeepCopyInto ¶
func (in *LocalStorageNodeList) DeepCopyInto(out *LocalStorageNodeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalStorageNodeList) DeepCopyObject ¶
func (in *LocalStorageNodeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalStorageNodeSpec ¶
type LocalStorageNodeSpec struct { HostName string `json:"hostname,omitempty"` // IPv4 address is for HA replication traffic StorageIP string `json:"storageIP,omitempty"` Topo Topology `json:"topogoly,omitempty"` }
LocalStorageNodeSpec defines the desired state of LocalStorageNode
func (*LocalStorageNodeSpec) DeepCopy ¶
func (in *LocalStorageNodeSpec) DeepCopy() *LocalStorageNodeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorageNodeSpec.
func (*LocalStorageNodeSpec) DeepCopyInto ¶
func (in *LocalStorageNodeSpec) DeepCopyInto(out *LocalStorageNodeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalStorageNodeStatus ¶
type LocalStorageNodeStatus struct { // There may have multiple storage pools in a node. // e.g. HDD_POOL, SSD_POOL, NVMe_POOL // Pools: poolName -> LocalPool Pools map[string]LocalPool `json:"pools,omitempty"` // State of the Local Storage Node/Member: New, Active, Inactive, Failed State State `json:"state,omitempty"` // Represents the latest available observations of a localstoragenode's current state. // +optional Conditions []StorageNodeCondition `json:"conditions,omitempty"` // PoolExtendRecords record why disks are joined in the pool // +optional PoolExtendRecords map[string]LocalDiskClaimSpecArray `json:"poolExtendRecords,omitempty"` }
LocalStorageNodeStatus defines the observed state of LocalStorageNode
func (*LocalStorageNodeStatus) DeepCopy ¶
func (in *LocalStorageNodeStatus) DeepCopy() *LocalStorageNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalStorageNodeStatus.
func (*LocalStorageNodeStatus) DeepCopyInto ¶
func (in *LocalStorageNodeStatus) DeepCopyInto(out *LocalStorageNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolume ¶
type LocalVolume struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeSpec `json:"spec,omitempty"` Status LocalVolumeStatus `json:"status,omitempty"` }
LocalVolume is the Schema for the volumes API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumes,scope=Cluster,shortName=lv +kubebuilder:printcolumn:name="pool",type=string,JSONPath=`.spec.poolName`,description="Name of storage pool" +kubebuilder:printcolumn:name="replicas",type=integer,JSONPath=`.spec.replicaNumber`,description="Number of volume replica" +kubebuilder:printcolumn:name="capacity",type=integer,JSONPath=`.spec.requiredCapacityBytes`,description="Required capacity of the volume" +kubebuilder:printcolumn:name="used",type=integer,JSONPath=`.status.usedCapacityBytes`,description="Used capacity of the volume" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the volume" +kubebuilder:printcolumn:name="resource",type=integer,JSONPath=`.spec.config.resourceID`,description="Allocated resource ID for the volume",priority=1 +kubebuilder:printcolumn:name="published",type=string,JSONPath=`.status.publishedNode`,description="Name of the node where the volume is in-use" +kubebuilder:printcolumn:name="fstype",type=string,JSONPath=`.status.fsType`,description="Filesystem type of this volume",priority=1 +kubebuilder:printcolumn:name="group",type=string,JSONPath=`.spec.volumegroup`,description="Name of volume group",priority=1 +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolume) DeepCopy ¶
func (in *LocalVolume) DeepCopy() *LocalVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolume.
func (*LocalVolume) DeepCopyInto ¶
func (in *LocalVolume) DeepCopyInto(out *LocalVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolume) DeepCopyObject ¶
func (in *LocalVolume) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*LocalVolume) IsHighAvailability ¶
func (v *LocalVolume) IsHighAvailability() bool
IsHighAvailability return true if volume is HighAvailability
func (*LocalVolume) SetReplicas ¶
func (v *LocalVolume) SetReplicas(replicas []*LocalVolumeReplica)
SetReplicas add replicas into status
func (*LocalVolume) UpdateAccessibilityNodesFromReplicas ¶
func (v *LocalVolume) UpdateAccessibilityNodesFromReplicas()
UpdateAccessibilityNodesFromReplicas Update volume and group's accessibility node by replicas
type LocalVolumeConvert ¶
type LocalVolumeConvert struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeConvertSpec `json:"spec,omitempty"` Status LocalVolumeConvertStatus `json:"status,omitempty"` }
LocalVolumeConvert is the Schema for the localvolumeconverts API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumeconverts,scope=Cluster,shortName=lvconvert +kubebuilder:printcolumn:name="volume",type=string,JSONPath=`.spec.volumeName`,description="Name of the volume to convert" +kubebuilder:printcolumn:name="replicas",type=integer,JSONPath=`.spec.replicaNumber`,description="Number of volume replica" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the expansion" +kubebuilder:printcolumn:name="message",type=string,JSONPath=`.status.message`,description="Event message of the expansion" +kubebuilder:printcolumn:name="abort",type=boolean,JSONPath=`.spec.abort`,description="Abort the operation" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeConvert) DeepCopy ¶
func (in *LocalVolumeConvert) DeepCopy() *LocalVolumeConvert
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeConvert.
func (*LocalVolumeConvert) DeepCopyInto ¶
func (in *LocalVolumeConvert) DeepCopyInto(out *LocalVolumeConvert)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeConvert) DeepCopyObject ¶
func (in *LocalVolumeConvert) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeConvertList ¶
type LocalVolumeConvertList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeConvert `json:"items"` }
LocalVolumeConvertList contains a list of LocalVolumeConvert
func (*LocalVolumeConvertList) DeepCopy ¶
func (in *LocalVolumeConvertList) DeepCopy() *LocalVolumeConvertList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeConvertList.
func (*LocalVolumeConvertList) DeepCopyInto ¶
func (in *LocalVolumeConvertList) DeepCopyInto(out *LocalVolumeConvertList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeConvertList) DeepCopyObject ¶
func (in *LocalVolumeConvertList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeConvertSpec ¶
type LocalVolumeConvertSpec struct { VolumeName string `json:"volumeName,omitempty"` // ReplicaNumber is the number of replicas which the volume will be converted to // currently, only support the case of converting a non-HA volume to HA // +kubebuilder:validation:Minimum:=2 // +kubebuilder:validation:Maximum:=2 ReplicaNumber int64 `json:"replicaNumber,omitempty"` // +kubebuilder:default:=false Abort bool `json:"abort,omitempty"` }
LocalVolumeConvertSpec defines the desired state of LocalVolumeConvert
func (*LocalVolumeConvertSpec) DeepCopy ¶
func (in *LocalVolumeConvertSpec) DeepCopy() *LocalVolumeConvertSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeConvertSpec.
func (*LocalVolumeConvertSpec) DeepCopyInto ¶
func (in *LocalVolumeConvertSpec) DeepCopyInto(out *LocalVolumeConvertSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeConvertStatus ¶
type LocalVolumeConvertStatus struct { State State `json:"state,omitempty"` Message string `json:"message,omitempty"` }
LocalVolumeConvertStatus defines the observed state of LocalVolumeConvert
func (*LocalVolumeConvertStatus) DeepCopy ¶
func (in *LocalVolumeConvertStatus) DeepCopy() *LocalVolumeConvertStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeConvertStatus.
func (*LocalVolumeConvertStatus) DeepCopyInto ¶
func (in *LocalVolumeConvertStatus) DeepCopyInto(out *LocalVolumeConvertStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeExpand ¶
type LocalVolumeExpand struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeExpandSpec `json:"spec,omitempty"` Status LocalVolumeExpandStatus `json:"status,omitempty"` }
LocalVolumeExpand is the Schema for the localvolumeexpands API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumeexpands,scope=Cluster,shortName=lvexpand +kubebuilder:printcolumn:name="newCapacity",type=integer,JSONPath=`.spec.requiredCapacityBytes`,description="New capacity of the volume" +kubebuilder:printcolumn:name="abort",type=boolean,JSONPath=`.spec.abort`,description="Abort the operation" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the expansion" +kubebuilder:printcolumn:name="subs",type=string,JSONPath=`.status.subs`,description="Sub-operations on each volume replica expansion" +kubebuilder:printcolumn:name="message",type=string,JSONPath=`.status.message`,description="Event message of the expansion" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeExpand) AddSubs ¶
func (v *LocalVolumeExpand) AddSubs(subNames ...string)
AddSubs updates with subs info
func (*LocalVolumeExpand) DeepCopy ¶
func (in *LocalVolumeExpand) DeepCopy() *LocalVolumeExpand
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeExpand.
func (*LocalVolumeExpand) DeepCopyInto ¶
func (in *LocalVolumeExpand) DeepCopyInto(out *LocalVolumeExpand)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeExpand) DeepCopyObject ¶
func (in *LocalVolumeExpand) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*LocalVolumeExpand) HasSub ¶
func (v *LocalVolumeExpand) HasSub(name string) bool
HasSub updates with sub-resource info
type LocalVolumeExpandList ¶
type LocalVolumeExpandList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeExpand `json:"items"` }
LocalVolumeExpandList contains a list of LocalVolumeExpand
func (*LocalVolumeExpandList) DeepCopy ¶
func (in *LocalVolumeExpandList) DeepCopy() *LocalVolumeExpandList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeExpandList.
func (*LocalVolumeExpandList) DeepCopyInto ¶
func (in *LocalVolumeExpandList) DeepCopyInto(out *LocalVolumeExpandList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeExpandList) DeepCopyObject ¶
func (in *LocalVolumeExpandList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeExpandSpec ¶
type LocalVolumeExpandSpec struct { VolumeName string `json:"volumeName,omitempty"` // +kubebuilder:validation:Minimum:=4194304 RequiredCapacityBytes int64 `json:"requiredCapacityBytes,omitempty"` // +kubebuilder:default:=false Abort bool `json:"abort,omitempty"` }
LocalVolumeExpandSpec defines the desired state of LocalVolumeExpand
func (*LocalVolumeExpandSpec) DeepCopy ¶
func (in *LocalVolumeExpandSpec) DeepCopy() *LocalVolumeExpandSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeExpandSpec.
func (*LocalVolumeExpandSpec) DeepCopyInto ¶
func (in *LocalVolumeExpandSpec) DeepCopyInto(out *LocalVolumeExpandSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeExpandStatus ¶
type LocalVolumeExpandStatus struct { AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // sub resources at different node. Subs []string `json:"subs,omitempty"` State State `json:"state,omitempty"` Message string `json:"message,omitempty"` }
LocalVolumeExpandStatus defines the observed state of LocalVolumeExpand
func (*LocalVolumeExpandStatus) DeepCopy ¶
func (in *LocalVolumeExpandStatus) DeepCopy() *LocalVolumeExpandStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeExpandStatus.
func (*LocalVolumeExpandStatus) DeepCopyInto ¶
func (in *LocalVolumeExpandStatus) DeepCopyInto(out *LocalVolumeExpandStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeGroup ¶
type LocalVolumeGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeGroupSpec `json:"spec,omitempty"` Status LocalVolumeGroupStatus `json:"status,omitempty"` }
LocalVolumeGroup is the Schema for the localvolumegroups API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumegroups,scope=Cluster,shortName=lvg +kubebuilder:printcolumn:name="pod",type=string,JSONPath=`.spec.pods`,description="Name of associated pod" +kubebuilder:printcolumn:name="namespace",type=string,JSONPath=`.spec.namespace`,description="Namespace of associated pod" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeGroup) DeepCopy ¶
func (in *LocalVolumeGroup) DeepCopy() *LocalVolumeGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeGroup.
func (*LocalVolumeGroup) DeepCopyInto ¶
func (in *LocalVolumeGroup) DeepCopyInto(out *LocalVolumeGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeGroup) DeepCopyObject ¶
func (in *LocalVolumeGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*LocalVolumeGroup) SetAccessibilityNodes ¶
func (c *LocalVolumeGroup) SetAccessibilityNodes(nodes []string)
SetAccessibilityNodes Set group's accessibility node
type LocalVolumeGroupList ¶
type LocalVolumeGroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeGroup `json:"items"` }
LocalVolumeGroupList contains a list of LocalVolumeGroup
func (*LocalVolumeGroupList) DeepCopy ¶
func (in *LocalVolumeGroupList) DeepCopy() *LocalVolumeGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeGroupList.
func (*LocalVolumeGroupList) DeepCopyInto ¶
func (in *LocalVolumeGroupList) DeepCopyInto(out *LocalVolumeGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeGroupList) DeepCopyObject ¶
func (in *LocalVolumeGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeGroupSpec ¶
type LocalVolumeGroupSpec struct { // Volumes is the collection of the volumes in the group Volumes []VolumeInfo `json:"volumes,omitempty"` // Accessibility is the topology requirement of the volume. It describes how to locate and distribute the volume replicas Accessibility AccessibilityTopology `json:"accessibility,omitempty"` Pods []string `json:"pods,omitempty"` Namespace string `json:"namespace,omitempty"` }
LocalVolumeGroupSpec defines the desired state of LocalVolumeGroup
func (*LocalVolumeGroupSpec) DeepCopy ¶
func (in *LocalVolumeGroupSpec) DeepCopy() *LocalVolumeGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeGroupSpec.
func (*LocalVolumeGroupSpec) DeepCopyInto ¶
func (in *LocalVolumeGroupSpec) DeepCopyInto(out *LocalVolumeGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeGroupStatus ¶
type LocalVolumeGroupStatus struct { }
LocalVolumeGroupStatus defines the observed state of LocalVolumeGroup
func (*LocalVolumeGroupStatus) DeepCopy ¶
func (in *LocalVolumeGroupStatus) DeepCopy() *LocalVolumeGroupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeGroupStatus.
func (*LocalVolumeGroupStatus) DeepCopyInto ¶
func (in *LocalVolumeGroupStatus) DeepCopyInto(out *LocalVolumeGroupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeList ¶
type LocalVolumeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolume `json:"items"` }
LocalVolumeList contains a list of LocalVolume
func (*LocalVolumeList) DeepCopy ¶
func (in *LocalVolumeList) DeepCopy() *LocalVolumeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeList.
func (*LocalVolumeList) DeepCopyInto ¶
func (in *LocalVolumeList) DeepCopyInto(out *LocalVolumeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeList) DeepCopyObject ¶
func (in *LocalVolumeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeMigrate ¶
type LocalVolumeMigrate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeMigrateSpec `json:"spec,omitempty"` Status LocalVolumeMigrateStatus `json:"status,omitempty"` }
LocalVolumeMigrate is the Schema for the localvolumemigrates API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumemigrates,scope=Cluster,shortName=lvmigrate +kubebuilder:printcolumn:name="volume",type=string,JSONPath=`.spec.volumeName`,description="Name of the volume to be migrated" +kubebuilder:printcolumn:name="from",type=string,JSONPath=`.spec.sourceNode`,description="Node name of the volume replica to be migrated" +kubebuilder:printcolumn:name="to",type=string,JSONPath=`.status.targetNode`,description="Node name of the new volume replica" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the migration" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeMigrate) DeepCopy ¶
func (in *LocalVolumeMigrate) DeepCopy() *LocalVolumeMigrate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeMigrate.
func (*LocalVolumeMigrate) DeepCopyInto ¶
func (in *LocalVolumeMigrate) DeepCopyInto(out *LocalVolumeMigrate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeMigrate) DeepCopyObject ¶
func (in *LocalVolumeMigrate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeMigrateList ¶
type LocalVolumeMigrateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeMigrate `json:"items"` }
LocalVolumeMigrateList contains a list of LocalVolumeMigrate
func (*LocalVolumeMigrateList) DeepCopy ¶
func (in *LocalVolumeMigrateList) DeepCopy() *LocalVolumeMigrateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeMigrateList.
func (*LocalVolumeMigrateList) DeepCopyInto ¶
func (in *LocalVolumeMigrateList) DeepCopyInto(out *LocalVolumeMigrateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeMigrateList) DeepCopyObject ¶
func (in *LocalVolumeMigrateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeMigrateSpec ¶
type LocalVolumeMigrateSpec struct { VolumeName string `json:"volumeName"` // source NodeNames SourceNode string `json:"sourceNode"` // suggested target NodeNames TargetNodesSuggested []string `json:"targetNodesSuggested"` // +kubebuilder:default:=true MigrateAllVols bool `json:"migrateAllVols,omitempty"` // +kubebuilder:default:=false Abort bool `json:"abort,omitempty"` }
LocalVolumeMigrateSpec defines the desired state of LocalVolumeMigrate
func (*LocalVolumeMigrateSpec) DeepCopy ¶
func (in *LocalVolumeMigrateSpec) DeepCopy() *LocalVolumeMigrateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeMigrateSpec.
func (*LocalVolumeMigrateSpec) DeepCopyInto ¶
func (in *LocalVolumeMigrateSpec) DeepCopyInto(out *LocalVolumeMigrateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeMigrateStatus ¶
type LocalVolumeMigrateStatus struct { // record the volume's replica number, it will be set internally OriginalReplicaNumber int64 `json:"originalReplicaNumber,omitempty"` // record the node where the specified replica is migrated to TargetNode string `json:"targetNode,omitempty"` // record all the volumes to be migrated Volumes []string `json:"volumes"` // State of the operation, e.g. submitted, started, completed, abort, ... State State `json:"state,omitempty"` // error message to describe some states Message string `json:"message,omitempty"` }
LocalVolumeMigrateStatus defines the observed state of LocalVolumeMigrate
func (*LocalVolumeMigrateStatus) DeepCopy ¶
func (in *LocalVolumeMigrateStatus) DeepCopy() *LocalVolumeMigrateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeMigrateStatus.
func (*LocalVolumeMigrateStatus) DeepCopyInto ¶
func (in *LocalVolumeMigrateStatus) DeepCopyInto(out *LocalVolumeMigrateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplica ¶
type LocalVolumeReplica struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeReplicaSpec `json:"spec,omitempty"` Status LocalVolumeReplicaStatus `json:"status,omitempty"` }
LocalVolumeReplica is the Schema for the volumereplicas API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumereplicas,scope=Cluster,shortName=lvr +kubebuilder:printcolumn:name="capacity",type=integer,JSONPath=`.spec.requiredCapacityBytes`,description="Required capacity of the volume replica" +kubebuilder:printcolumn:name="node",type=string,JSONPath=`.spec.nodeName`,description="Node name where the volume replica is located at" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the volume replica" +kubebuilder:printcolumn:name="synced",type=boolean,JSONPath=`.status.synced`,description="Sync status of the volume replica" +kubebuilder:printcolumn:name="device",type=string,JSONPath=`.status.devPath`,description="Device path of the volume replica" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeReplica) DeepCopy ¶
func (in *LocalVolumeReplica) DeepCopy() *LocalVolumeReplica
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplica.
func (*LocalVolumeReplica) DeepCopyInto ¶
func (in *LocalVolumeReplica) DeepCopyInto(out *LocalVolumeReplica)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplica) DeepCopyObject ¶
func (in *LocalVolumeReplica) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaList ¶
type LocalVolumeReplicaList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeReplica `json:"items"` }
LocalVolumeReplicaList contains a list of LocalVolumeReplica
func (*LocalVolumeReplicaList) DeepCopy ¶
func (in *LocalVolumeReplicaList) DeepCopy() *LocalVolumeReplicaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaList.
func (*LocalVolumeReplicaList) DeepCopyInto ¶
func (in *LocalVolumeReplicaList) DeepCopyInto(out *LocalVolumeReplicaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplicaList) DeepCopyObject ¶
func (in *LocalVolumeReplicaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaSnapshot ¶
type LocalVolumeReplicaSnapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeReplicaSnapshotSpec `json:"spec,omitempty"` Status LocalVolumeReplicaSnapshotStatus `json:"status,omitempty"` }
LocalVolumeReplicaSnapshot is the Schema for the localvolumereplicasnapshots API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumereplicasnapshots,scope=Cluster,shortName=lvrs +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Capacity",type=integer,JSONPath=`.status.allocatedCapacityBytes`,description="Allocated capacity of the snapshot" +kubebuilder:printcolumn:name="NodeName",type=string,JSONPath=`.spec.nodeName`,description="Node where snapshot is located" +kubebuilder:printcolumn:name="SourceVolume",type=string,JSONPath=`.spec.sourceVolume`,description="Name of the snapshot's source volume" +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`,description="State of the snapshot" +kubebuilder:printcolumn:name="Merging",type=string,JSONPath=`.status.attr.merging`,description="if the snapshot is merging" +kubebuilder:printcolumn:name="Invalid",type=string,JSONPath=`.status.attr.invalid`,description="if the snapshot is invalid" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.status.creationTime` +kubebuilder:printcolumn:name="SourceVolumeReplica",type=string,JSONPath=`.spec.sourceVolumeReplica`,description="Name of the snapshot's source volume replica",priority=1
func (*LocalVolumeReplicaSnapshot) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshot) DeepCopy() *LocalVolumeReplicaSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshot.
func (*LocalVolumeReplicaSnapshot) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshot) DeepCopyInto(out *LocalVolumeReplicaSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplicaSnapshot) DeepCopyObject ¶
func (in *LocalVolumeReplicaSnapshot) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaSnapshotList ¶
type LocalVolumeReplicaSnapshotList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeReplicaSnapshot `json:"items"` }
LocalVolumeReplicaSnapshotList contains a list of LocalVolumeReplicaSnapshot
func (*LocalVolumeReplicaSnapshotList) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotList) DeepCopy() *LocalVolumeReplicaSnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotList.
func (*LocalVolumeReplicaSnapshotList) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotList) DeepCopyInto(out *LocalVolumeReplicaSnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplicaSnapshotList) DeepCopyObject ¶
func (in *LocalVolumeReplicaSnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaSnapshotRestore ¶
type LocalVolumeReplicaSnapshotRestore struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeReplicaSnapshotRestoreSpec `json:"spec,omitempty"` Status LocalVolumeReplicaSnapshotRestoreStatus `json:"status,omitempty"` }
LocalVolumeReplicaSnapshotRestore is the Schema for the localvolumereplicasnapshotrestores API +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumereplicasnapshotrestores,scope=Cluster,shortName=lvrsrestore;lvrsnaprestore +kubebuilder:printcolumn:name="nodeName",type=string,JSONPath=`.spec.nodeName`,description="Node to restore" +kubebuilder:printcolumn:name="targetvolume",type=string,JSONPath=`.spec.targetVolume`,description="Target for the restore" +kubebuilder:printcolumn:name="sourcesnapshot",type=string,JSONPath=`.spec.sourceVolumeSnapshot`,description="Source snapshot for the restore" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the restore" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeReplicaSnapshotRestore) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotRestore) DeepCopy() *LocalVolumeReplicaSnapshotRestore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotRestore.
func (*LocalVolumeReplicaSnapshotRestore) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotRestore) DeepCopyInto(out *LocalVolumeReplicaSnapshotRestore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplicaSnapshotRestore) DeepCopyObject ¶
func (in *LocalVolumeReplicaSnapshotRestore) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaSnapshotRestoreList ¶
type LocalVolumeReplicaSnapshotRestoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeReplicaSnapshotRestore `json:"items"` }
LocalVolumeReplicaSnapshotRestoreList contains a list of LocalVolumeReplicaSnapshotRestore
func (*LocalVolumeReplicaSnapshotRestoreList) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotRestoreList) DeepCopy() *LocalVolumeReplicaSnapshotRestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotRestoreList.
func (*LocalVolumeReplicaSnapshotRestoreList) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotRestoreList) DeepCopyInto(out *LocalVolumeReplicaSnapshotRestoreList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeReplicaSnapshotRestoreList) DeepCopyObject ¶
func (in *LocalVolumeReplicaSnapshotRestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeReplicaSnapshotRestoreSpec ¶
type LocalVolumeReplicaSnapshotRestoreSpec struct { // NodeName is the name of the node that snapshot will be restored at // +kubebuilder:validation:Required NodeName string `json:"nodeName"` // TargetVolume is the name of the volume to restore to // +kubebuilder:validation:Required TargetVolume string `json:"targetVolume"` // TargetVolume is the name of the target volume will place at // +kubebuilder:validation:Required TargetPoolName string `json:"targetPoolName"` // SourceVolumeSnapshot represents which snapshot is used for volume to restore from // +kubebuilder:validation:Required SourceVolumeSnapshot string `json:"sourceVolumeSnapshot"` // SourceVolumeReplicaSnapshot represents which replica snapshot is used for volume to restore from // +kubebuilder:validation:Required SourceVolumeReplicaSnapshot string `json:"sourceVolumeReplicaSnapshot"` // RestoreType is the type about how to restore the volume, e.g. rollback, create. By default create. // +kubebuilder:default:=create // +kubebuilder:validation:Required // +kubebuilder:validation:Enum:=rollback;create RestoreType RestoreType `json:"restoreType"` // +kubebuilder:validation:Required VolumeSnapshotRestore string `json:"volumeSnapshotRestore"` // Abort can be used to abort the restore operation and clean up sub resources created by the restore operation automatically // +kubebuilder:default:=false Abort bool `json:"abort,omitempty"` }
LocalVolumeReplicaSnapshotRestoreSpec defines the desired state of LocalVolumeReplicaSnapshotRestore
func (*LocalVolumeReplicaSnapshotRestoreSpec) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotRestoreSpec) DeepCopy() *LocalVolumeReplicaSnapshotRestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotRestoreSpec.
func (*LocalVolumeReplicaSnapshotRestoreSpec) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotRestoreSpec) DeepCopyInto(out *LocalVolumeReplicaSnapshotRestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplicaSnapshotRestoreStatus ¶
type LocalVolumeReplicaSnapshotRestoreStatus struct { // State is the phase of restore volume snapshot, e.g. submitted, started, completed, abort, ... State State `json:"state,omitempty"` // Message error message to describe some states Message string `json:"message,omitempty"` }
LocalVolumeReplicaSnapshotRestoreStatus defines the observed state of LocalVolumeReplicaSnapshotRestore
func (*LocalVolumeReplicaSnapshotRestoreStatus) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotRestoreStatus) DeepCopy() *LocalVolumeReplicaSnapshotRestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotRestoreStatus.
func (*LocalVolumeReplicaSnapshotRestoreStatus) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotRestoreStatus) DeepCopyInto(out *LocalVolumeReplicaSnapshotRestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplicaSnapshotSpec ¶
type LocalVolumeReplicaSnapshotSpec struct { // NodeName specifies which node the snapshot will be placed // +kubebuilder:validation:Required NodeName string `json:"nodeName"` // VolumeSnapshotName represents the name of volume snapshot // +kubebuilder:validation:Required VolumeSnapshotName string `json:"volumeSnapshotName"` // SourceVolume specifies the source volume name of the snapshot // +kubebuilder:validation:Required SourceVolume string `json:"sourceVolume"` // SourceVolume specifies the source volume replica name of the snapshot // +kubebuilder:validation:Required SourceVolumeReplica string `json:"sourceVolumeReplica"` // PoolName specifies which volume group the snapshot and source volume is placed // valid options are LocalStorage_PoolHDD, LocalStorage_PoolSSD, LocalStorage_PoolNVMe // +kubebuilder:validation:Required // +kubebuilder:validation:Enum:=LocalStorage_PoolHDD;LocalStorage_PoolSSD;LocalStorage_PoolNVMe PoolName string `json:"poolName"` // RequiredCapacityBytes specifies the space reserved for the snapshot // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum:=4194304 RequiredCapacityBytes int64 `json:"requiredCapacityBytes"` // Delete this snapshot if it is true // +kubebuilder:default:=false Delete bool `json:"delete,omitempty"` }
LocalVolumeReplicaSnapshotSpec represents the actual localvolume snapshot object in lvm
func (*LocalVolumeReplicaSnapshotSpec) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotSpec) DeepCopy() *LocalVolumeReplicaSnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotSpec.
func (*LocalVolumeReplicaSnapshotSpec) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotSpec) DeepCopyInto(out *LocalVolumeReplicaSnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplicaSnapshotStatus ¶
type LocalVolumeReplicaSnapshotStatus struct { // AllocatedCapacityBytes is the real allocated capacity in bytes AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // CreationTime is the host real snapshot creation time CreationTime *metav1.Time `json:"creationTime,omitempty"` // Attribute indicates attr on snapshot Attribute VolumeSnapshotAttr `json:"attr,omitempty"` // State is the phase of volume replica, e.g. Creating, Ready, NotReady, ToBeDeleted, Deleted State State `json:"state,omitempty"` // Message error message to describe some states Message string `json:"reason,omitempty"` }
LocalVolumeReplicaSnapshotStatus defines the observed state of LocalVolumeReplicaSnapshot
func (*LocalVolumeReplicaSnapshotStatus) DeepCopy ¶
func (in *LocalVolumeReplicaSnapshotStatus) DeepCopy() *LocalVolumeReplicaSnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSnapshotStatus.
func (*LocalVolumeReplicaSnapshotStatus) DeepCopyInto ¶
func (in *LocalVolumeReplicaSnapshotStatus) DeepCopyInto(out *LocalVolumeReplicaSnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplicaSpec ¶
type LocalVolumeReplicaSpec struct { // VolumeName is the name of the volume, e.g. pvc-fbf3ffc3-66db-4dae-9032-bda3c61b8f85 VolumeName string `json:"volumeName,omitempty"` // PoolName is the name of the storage pool, e.g. LocalStorage_PoolHDD, LocalStorage_PoolSSD, etc.. PoolName string `json:"poolName,omitempty"` // NodeName is the assigned node where the volume replica is located NodeName string `json:"nodeName,omitempty"` // +kubebuilder:validation:Minimum:=4194304 RequiredCapacityBytes int64 `json:"requiredCapacityBytes,omitempty"` // VolumeQoS is the QoS of the volume VolumeQoS VolumeQoS `json:"volumeQoS,omitempty"` // Delete is to indicate where the replica should be deleted or not. // It's different from the regular resource delete interface in Kubernetes. // The purpose is to protect it from any mistakes // +kubebuilder:default:=false Delete bool `json:"delete,omitempty"` }
LocalVolumeReplicaSpec defines the desired state of LocalVolumeReplica
func (*LocalVolumeReplicaSpec) DeepCopy ¶
func (in *LocalVolumeReplicaSpec) DeepCopy() *LocalVolumeReplicaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaSpec.
func (*LocalVolumeReplicaSpec) DeepCopyInto ¶
func (in *LocalVolumeReplicaSpec) DeepCopyInto(out *LocalVolumeReplicaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeReplicaStatus ¶
type LocalVolumeReplicaStatus struct { // StoragePath is a real path of the volume replica, like /dev/sdg. StoragePath string `json:"storagePath,omitempty"` // DevicePath is a link path of the StoragePath of the volume replica, // e.g. /dev/LocalStorage_PoolHDD/pvc-fbf3ffc3-66db-4dae-9032-bda3c61b8f85 DevicePath string `json:"devPath,omitempty"` // Disks is a list of physical disks where the volume replica is spread cross, especially for striped LVM volume replica Disks []string `json:"disks,omitempty"` // AllocatedCapacityBytes is the real allocated capacity in bytes AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // State is the phase of volume replica, e.g. Creating, Ready, NotReady, ToBeDeleted, Deleted State State `json:"state,omitempty"` // Synced is the sync state of the volume replica, which is important in HA volume // +kubebuilder:default:=false Synced bool `json:"synced,omitempty"` // HAState is state for ha replica, replica.Status.State == Ready only when HAState is Consistent of nil HAState *HAState `json:"haState,omitempty"` // InUse is one of volume replica's states, which indicates the replica is used by a Pod or not // +kubebuilder:default:=false InUse bool `json:"inuse,omitempty"` }
LocalVolumeReplicaStatus defines the observed state of LocalVolumeReplica
func (*LocalVolumeReplicaStatus) DeepCopy ¶
func (in *LocalVolumeReplicaStatus) DeepCopy() *LocalVolumeReplicaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeReplicaStatus.
func (*LocalVolumeReplicaStatus) DeepCopyInto ¶
func (in *LocalVolumeReplicaStatus) DeepCopyInto(out *LocalVolumeReplicaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeSnapshot ¶
type LocalVolumeSnapshot struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeSnapshotSpec `json:"spec,omitempty"` Status LocalVolumeSnapshotStatus `json:"status,omitempty"` }
LocalVolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent localvolume, or binding to a pre-existing snapshot. +kubebuilder:object:root=true +kubebuilder:resource:path=localvolumesnapshots,scope=Cluster,shortName=lvs +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Capacity",type=integer,JSONPath=`.status.allocatedCapacityBytes`,description="Required capacity of the volume snapshot" +kubebuilder:printcolumn:name="SourceVolume",type=string,JSONPath=`.spec.sourceVolume`,description="Name of the snapshot's source volume" +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`,description="State of the snapshot" +kubebuilder:printcolumn:name="Merging",type=string,JSONPath=`.status.attr.merging`,description="if the snapshot is merging" +kubebuilder:printcolumn:name="Invalid",type=string,JSONPath=`.status.attr.invalid`,description="if the snapshot is invalid" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.status.creationTime`
func (*LocalVolumeSnapshot) DeepCopy ¶
func (in *LocalVolumeSnapshot) DeepCopy() *LocalVolumeSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshot.
func (*LocalVolumeSnapshot) DeepCopyInto ¶
func (in *LocalVolumeSnapshot) DeepCopyInto(out *LocalVolumeSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeSnapshot) DeepCopyObject ¶
func (in *LocalVolumeSnapshot) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeSnapshotList ¶
type LocalVolumeSnapshotList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeSnapshot `json:"items"` }
LocalVolumeSnapshotList contains a list of LocalVolumeSnapshot
func (*LocalVolumeSnapshotList) DeepCopy ¶
func (in *LocalVolumeSnapshotList) DeepCopy() *LocalVolumeSnapshotList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotList.
func (*LocalVolumeSnapshotList) DeepCopyInto ¶
func (in *LocalVolumeSnapshotList) DeepCopyInto(out *LocalVolumeSnapshotList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeSnapshotList) DeepCopyObject ¶
func (in *LocalVolumeSnapshotList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeSnapshotRestore ¶
type LocalVolumeSnapshotRestore struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec LocalVolumeSnapshotRestoreSpec `json:"spec,omitempty"` Status LocalVolumeSnapshotRestoreStatus `json:"status,omitempty"` }
LocalVolumeSnapshotRestore is a user's request for either restoring a local volume snapshot to a new volume, or merging into the old volume. +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumesnapshotrestores,scope=Cluster,shortName=lvsrestore;lvsnaprestore +kubebuilder:printcolumn:name="targetvolume",type=string,JSONPath=`.spec.targetVolume`,description="Target for the restore" +kubebuilder:printcolumn:name="sourcesnapshot",type=string,JSONPath=`.spec.sourceVolumeSnapshot`,description="Source snapshot for the restore" +kubebuilder:printcolumn:name="state",type=string,JSONPath=`.status.state`,description="State of the restore" +kubebuilder:printcolumn:name="age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*LocalVolumeSnapshotRestore) DeepCopy ¶
func (in *LocalVolumeSnapshotRestore) DeepCopy() *LocalVolumeSnapshotRestore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotRestore.
func (*LocalVolumeSnapshotRestore) DeepCopyInto ¶
func (in *LocalVolumeSnapshotRestore) DeepCopyInto(out *LocalVolumeSnapshotRestore)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeSnapshotRestore) DeepCopyObject ¶
func (in *LocalVolumeSnapshotRestore) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeSnapshotRestoreList ¶
type LocalVolumeSnapshotRestoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []LocalVolumeSnapshotRestore `json:"items"` }
LocalVolumeSnapshotRestoreList contains a list of LocalVolumeSnapshotRestore
func (*LocalVolumeSnapshotRestoreList) DeepCopy ¶
func (in *LocalVolumeSnapshotRestoreList) DeepCopy() *LocalVolumeSnapshotRestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotRestoreList.
func (*LocalVolumeSnapshotRestoreList) DeepCopyInto ¶
func (in *LocalVolumeSnapshotRestoreList) DeepCopyInto(out *LocalVolumeSnapshotRestoreList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeSnapshotRestoreList) DeepCopyObject ¶
func (in *LocalVolumeSnapshotRestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeSnapshotRestoreSpec ¶
type LocalVolumeSnapshotRestoreSpec struct { // TargetVolume is the name of the volume to restore to TargetVolume string `json:"targetVolume,omitempty"` // TargetVolume is the name of the target volume will place at TargetPoolName string `json:"targetPoolName,omitempty"` // SourceVolumeSnapshot represents which snapshot is used for volume to restore from // +kubebuilder:validation:Required SourceVolumeSnapshot string `json:"sourceVolumeSnapshot"` // RestoreType is the type about how to restore the volume, e.g., rollback, create. By default, create. // +Kubebuilder:default:=create // +kubebuilder:validation:Required // +kubebuilder:validation:Enum:=rollback;create RestoreType RestoreType `json:"restoreType"` // Abort can be used to abort the restore operation and clean up sub resources created by the restore operation automatically // +kubebuilder:default:=false Abort bool `json:"abort,omitempty"` }
LocalVolumeSnapshotRestoreSpec defines the desired state of LocalVolumeSnapshotRestore
func (*LocalVolumeSnapshotRestoreSpec) DeepCopy ¶
func (in *LocalVolumeSnapshotRestoreSpec) DeepCopy() *LocalVolumeSnapshotRestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotRestoreSpec.
func (*LocalVolumeSnapshotRestoreSpec) DeepCopyInto ¶
func (in *LocalVolumeSnapshotRestoreSpec) DeepCopyInto(out *LocalVolumeSnapshotRestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeSnapshotRestoreStatus ¶
type LocalVolumeSnapshotRestoreStatus struct { // VolumeReplicaSnapshotRestore is the replica snapshot to be restored VolumeReplicaSnapshotRestore []string `json:"volumeReplicaSnapshotRestore,omitempty"` // State is the phase of restore volume snapshot, e.g. submitted, started, completed, abort, ... State State `json:"state,omitempty"` // Message error message to describe some states Message string `json:"message,omitempty"` }
LocalVolumeSnapshotRestoreStatus defines the observed state of LocalVolumeSnapshotRestore
func (*LocalVolumeSnapshotRestoreStatus) DeepCopy ¶
func (in *LocalVolumeSnapshotRestoreStatus) DeepCopy() *LocalVolumeSnapshotRestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotRestoreStatus.
func (*LocalVolumeSnapshotRestoreStatus) DeepCopyInto ¶
func (in *LocalVolumeSnapshotRestoreStatus) DeepCopyInto(out *LocalVolumeSnapshotRestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeSnapshotSpec ¶
type LocalVolumeSnapshotSpec struct { // SourceVolume specifies the source volume of the snapshot // +kubebuilder:validation:Required SourceVolume string `json:"sourceVolume"` // NOTE: We only take snapshots on the volume replica exist at the moment! // Accessibility is the topology requirement of the volume snapshot. It describes how to locate and distribute the volume replicas snapshot. Accessibility AccessibilityTopology `json:"accessibility"` // RequiredCapacityBytes specifies the space reserved for the snapshot // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum:=4194304 RequiredCapacityBytes int64 `json:"requiredCapacityBytes"` // +kubebuilder:default:=false Delete bool `json:"delete,omitempty"` }
LocalVolumeSnapshotSpec describes the common attributes of a localvolume snapshot.
func (*LocalVolumeSnapshotSpec) DeepCopy ¶
func (in *LocalVolumeSnapshotSpec) DeepCopy() *LocalVolumeSnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotSpec.
func (*LocalVolumeSnapshotSpec) DeepCopyInto ¶
func (in *LocalVolumeSnapshotSpec) DeepCopyInto(out *LocalVolumeSnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeSnapshotStatus ¶
type LocalVolumeSnapshotStatus struct { // AllocatedCapacityBytes is the real allocated capacity in bytes // In case of HA volume with multiple replicas, the value is equal to the one of a replica's snapshot size AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // ReplicaSnapshots represents the actual snapshots of replica ReplicaSnapshots []string `json:"replicaSnapshots,omitempty"` // CreationTime is the host real snapshot creation time // In case of HA volume with multiple replicas, the value is equal to the one of a replica's snapshot creation time CreationTime *metav1.Time `json:"creationTime,omitempty"` // Attribute indicates attr on snapshot Attribute VolumeSnapshotAttr `json:"attr,omitempty"` // State is the phase of volume replica, e.g. Creating, Ready, NotReady, ToBeDeleted, Deleted State State `json:"state,omitempty"` // Message error message to describe some states Message string `json:"message,omitempty"` }
LocalVolumeSnapshotStatus defines the observed state of LocalVolumeSnapshot
func (*LocalVolumeSnapshotStatus) DeepCopy ¶
func (in *LocalVolumeSnapshotStatus) DeepCopy() *LocalVolumeSnapshotStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSnapshotStatus.
func (*LocalVolumeSnapshotStatus) DeepCopyInto ¶
func (in *LocalVolumeSnapshotStatus) DeepCopyInto(out *LocalVolumeSnapshotStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeSpec ¶
type LocalVolumeSpec struct { // +kubebuilder:validation:Minimum:=4194304 RequiredCapacityBytes int64 `json:"requiredCapacityBytes,omitempty"` // VolumeQoS is the QoS of the volume VolumeQoS VolumeQoS `json:"volumeQoS,omitempty"` // PoolName is the name of the storage pool, e.g. LocalStorage_PoolHDD, LocalStorage_PoolSSD, etc.. PoolName string `json:"poolName,omitempty"` // replica number: 1 - non-HA, 2 - HA, 4 - migration (temp) // +kubebuilder:validation:Minimum:=1 // +kubebuilder:validation:Maximum:=4 ReplicaNumber int64 `json:"replicaNumber,omitempty"` // Convertible is to indicate if the non-HA volume can be transitted to HA volume or not // +kubebuilder:default:=false Convertible bool `json:"convertible,omitempty"` // Accessibility is the topology requirement of the volume. It describes how to locate and distribute the volume replicas Accessibility AccessibilityTopology `json:"accessibility,omitempty"` // PersistentVolumeClaimNamespace is the namespace of the associated PVC PersistentVolumeClaimNamespace string `json:"pvcNamespace,omitempty"` // PersistentVolumeClaimName is the name of the associated PVC PersistentVolumeClaimName string `json:"pvcName,omitempty"` // VolumeGroup is the group name of the local volumes. It is designed for the scheduling and allocating. VolumeGroup string `json:"volumegroup,omitempty"` // Config is the configration for the volume replicas // It will be managed by the controller, and watched by all the nodes // Important: node will manage volume replica according this config Config *VolumeConfig `json:"config,omitempty"` // Delete is to indicate where the replica should be deleted or not. // It's different from the regular resource delete interface in Kubernetes. // The purpose is to protect it from any mistakes // +kubebuilder:default:=false Delete bool `json:"delete,omitempty"` }
LocalVolumeSpec defines the desired state of LocalVolume
func (*LocalVolumeSpec) DeepCopy ¶
func (in *LocalVolumeSpec) DeepCopy() *LocalVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeSpec.
func (*LocalVolumeSpec) DeepCopyInto ¶
func (in *LocalVolumeSpec) DeepCopyInto(out *LocalVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeStatus ¶
type LocalVolumeStatus struct { // AllocatedCapacityBytes is the real allocated capacity in bytes of the volume replicas. // In case of HA volume with multiple replicas, the value is equal to the one of a replica's size AllocatedCapacityBytes int64 `json:"allocatedCapacityBytes,omitempty"` // UsedCapacityBytes is the used capacity in bytes of the volume, which is available only for filesystem UsedCapacityBytes int64 `json:"usedCapacityBytes,omitempty"` // TotalINodes is the total inodes of the volume's filesystem TotalInodes int64 `json:"totalInode,omitempty"` // UsedInode is the used inodes of the volume's filesystem UsedInodes int64 `json:"usedInode,omitempty"` // Volume is a logical concept and composed by one or many replicas which will be located at different node. Replicas []string `json:"replicas,omitempty"` // State is the phase of volume replica, e.g. Creating, Ready, NotReady, ToBeDeleted, Deleted State State `json:"state,omitempty"` // PublishedNodeName is the node where the volume is published and used by pod PublishedNodeName string `json:"publishedNode,omitempty"` // PublishedFSType is the fstype on this volume PublishedFSType string `json:"fsType,omitempty"` // PublishedRawBlock is for raw block // +kubebuilder:default:=false PublishedRawBlock bool `json:"rawblock"` }
LocalVolumeStatus defines the observed state of LocalVolume
func (*LocalVolumeStatus) DeepCopy ¶
func (in *LocalVolumeStatus) DeepCopy() *LocalVolumeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeStatus.
func (*LocalVolumeStatus) DeepCopyInto ¶
func (in *LocalVolumeStatus) DeepCopyInto(out *LocalVolumeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MountPoint ¶
type MountPoint struct { // TargetPath TargetPath string `json:"targetPath,omitempty"` // VolumeCap VolumeCap VolumeCapability `json:"volumeCap,omitempty"` // FsTye FsTye string `json:"fsTye,omitempty"` // MountOptions MountOptions []string `json:"mountOptions,omitempty"` // Phase indicates the volume's next or current operation Phase State `json:"phase,omitempty"` }
MountPoint
func (*MountPoint) DeepCopy ¶
func (in *MountPoint) DeepCopy() *MountPoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountPoint.
func (*MountPoint) DeepCopyInto ¶
func (in *MountPoint) DeepCopyInto(out *MountPoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeConfig ¶
type NodeConfig struct { Name string `json:"name,omitempty"` StorageIP string `json:"ip,omitempty"` Topology *Topology `json:"topology,omitempty"` }
NodeConfig defines local storage system configurations
func (*NodeConfig) DeepCopy ¶
func (in *NodeConfig) DeepCopy() *NodeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfig.
func (*NodeConfig) DeepCopyInto ¶
func (in *NodeConfig) DeepCopyInto(out *NodeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PartitionInfo ¶
type PartitionInfo struct { // Path represents the partition path in the OS Path string `json:"path"` // HasFileSystem represents whether the filesystem is included HasFileSystem bool `json:"hasFileSystem"` // FileSystem contains mount point and filesystem type // +optional FileSystem FileSystemInfo `json:"filesystem,omitempty"` }
PartitionInfo contains partition information(e.g. FileSystem)
func (*PartitionInfo) DeepCopy ¶
func (in *PartitionInfo) DeepCopy() *PartitionInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartitionInfo.
func (*PartitionInfo) DeepCopyInto ¶
func (in *PartitionInfo) DeepCopyInto(out *PartitionInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RAIDInfo ¶
type RAIDInfo struct { // RAIDMaster is the master of the RAID disk, it works for only RAID slave disk, e.g. /dev/bus/0 RAIDMaster string `json:"raidMaster,omitempty"` }
RAIDInfo contains infos of raid
func (*RAIDInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAIDInfo.
func (*RAIDInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResizePolicy ¶
type ResizePolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ResizePolicySpec `json:"spec,omitempty"` Status ResizePolicyStatus `json:"status,omitempty"` }
ResizePolicy is the Schema for the resizepolicies API +kubebuilder:subresource:status +kubebuilder:resource:path=resizepolicies,scope=Cluster
func (*ResizePolicy) DeepCopy ¶
func (in *ResizePolicy) DeepCopy() *ResizePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResizePolicy.
func (*ResizePolicy) DeepCopyInto ¶
func (in *ResizePolicy) DeepCopyInto(out *ResizePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResizePolicy) DeepCopyObject ¶
func (in *ResizePolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResizePolicyList ¶
type ResizePolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ResizePolicy `json:"items"` }
ResizePolicyList contains a list of ResizePolicy
func (*ResizePolicyList) DeepCopy ¶
func (in *ResizePolicyList) DeepCopy() *ResizePolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResizePolicyList.
func (*ResizePolicyList) DeepCopyInto ¶
func (in *ResizePolicyList) DeepCopyInto(out *ResizePolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResizePolicyList) DeepCopyObject ¶
func (in *ResizePolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResizePolicySpec ¶
type ResizePolicySpec struct { WarningThreshold int8 `json:"warningThreshold"` ResizeThreshold int8 `json:"resizeThreshold"` NodePoolUsageLimit int8 `json:"nodePoolUsageLimit"` StorageClassSelector *metav1.LabelSelector `json:"storageClassSelector,omitempty"` NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` PVCSelector *metav1.LabelSelector `json:"pvcSelector,omitempty"` }
ResizePolicySpec defines the desired state of ResizePolicy
func (*ResizePolicySpec) DeepCopy ¶
func (in *ResizePolicySpec) DeepCopy() *ResizePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResizePolicySpec.
func (*ResizePolicySpec) DeepCopyInto ¶
func (in *ResizePolicySpec) DeepCopyInto(out *ResizePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResizePolicyStatus ¶
type ResizePolicyStatus struct { }
ResizePolicyStatus defines the observed state of ResizePolicy
func (*ResizePolicyStatus) DeepCopy ¶
func (in *ResizePolicyStatus) DeepCopy() *ResizePolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResizePolicyStatus.
func (*ResizePolicyStatus) DeepCopyInto ¶
func (in *ResizePolicyStatus) DeepCopyInto(out *ResizePolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreType ¶
type RestoreType string
const ( // RestoreTypeRollback is used to merge snapshot to existing volume RestoreTypeRollback RestoreType = "rollback" // RestoreTypeCreate is used to create a new volume from existing snapshot RestoreTypeCreate RestoreType = "create" )
type SmartAssessResult ¶
type SmartAssessResult string
SmartAssessResult defines the result of self-assessment test
const ( // AssessPassed indicates the disk is healthy AssessPassed SmartAssessResult = "Passed" // AssessFailed indicates the disk is unhealthy AssessFailed SmartAssessResult = "Failed" )
type SmartInfo ¶
type SmartInfo struct { // OverallHealth identifies if the disk is healthy or not OverallHealth SmartAssessResult `json:"overallHealth"` }
SmartInfo contains info collected by smartctl
func (*SmartInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SmartInfo.
func (*SmartInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageNodeCondition ¶
type StorageNodeCondition struct { // Type of localstoragenode condition. Type StorageNodeConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status ConditionStatus `json:"status"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. Reason string `json:"reason,omitempty"` // A human-readable message indicating details about the transition. Message string `json:"message,omitempty"` }
StorageNodeCondition describes the state of a localstoragenode at a certain point.
func (*StorageNodeCondition) DeepCopy ¶
func (in *StorageNodeCondition) DeepCopy() *StorageNodeCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageNodeCondition.
func (*StorageNodeCondition) DeepCopyInto ¶
func (in *StorageNodeCondition) DeepCopyInto(out *StorageNodeCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageNodeConditionType ¶
type StorageNodeConditionType string
const ( // StorageAvailable Available means the storagenode is available, i.e. the free storage capacity is more than or equal 0 StorageAvailable StorageNodeConditionType = "Available" // StorageUnAvailable UnAvailable means the storagenode is unavailable, i.e. the free storage capacity is less than or equal 0 StorageUnAvailable StorageNodeConditionType = "UnAvailable" // StorageProgressing Progressing means the storagenode is progressing, i.e. extending storage capacity StorageProgressing StorageNodeConditionType = "Progressing" // StorageExpandFailure is added in a storagenode when a disk fails to be joined the storage pool StorageExpandFailure StorageNodeConditionType = "ExpandFailure" // StorageExpandSuccess is added in a storagenode when a disk succeeds to be joined the storage pool StorageExpandSuccess StorageNodeConditionType = "ExpandSuccess" )
These are valid conditions of a storagenode.
type SystemConfig ¶
type SystemConfig struct { Mode SystemMode `json:"mode"` DRBD *DRBDSystemConfig `json:"drbd"` MaxHAVolumeCount int `json:"maxVolumeCount"` SyncToolName string `json:"syncTool"` }
SystemConfig is volume HA related system configuration
func (*SystemConfig) DeepCopy ¶
func (in *SystemConfig) DeepCopy() *SystemConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemConfig.
func (*SystemConfig) DeepCopyInto ¶
func (in *SystemConfig) DeepCopyInto(out *SystemConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemMode ¶
type SystemMode string
SystemMode of HA module
var (
SystemModeDRBD SystemMode = "drbd"
)
misc
type Topology ¶
type Topology struct { // Zone is a collection of Local Storage Nodes // +kubebuilder:default:=default Zone string `json:"zone,omitempty"` // Region is a collection of Zones // +kubebuilder:default:=default Region string `json:"region,omitempty"` }
Topology defines the topology info of Node
func (*Topology) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.
func (*Topology) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeAccessMode ¶
type VolumeAccessMode int32
type VolumeAccessType ¶
type VolumeAccessType string
type VolumeCapability ¶
type VolumeCapability struct { AccessMode VolumeAccessMode `json:"accessMode,omitempty"` AccessType VolumeAccessType `json:"accessType,omitempty"` }
func (*VolumeCapability) DeepCopy ¶
func (in *VolumeCapability) DeepCopy() *VolumeCapability
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeCapability.
func (*VolumeCapability) DeepCopyInto ¶
func (in *VolumeCapability) DeepCopyInto(out *VolumeCapability)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeConfig ¶
type VolumeConfig struct { // Version of config, start from 0, plus 1 every time config update Version int `json:"version"` VolumeName string `json:"volumeName"` RequiredCapacityBytes int64 `json:"requiredCapacityBytes"` // Convertible is to indicate if the non-HA volume can be transitted to HA volume or not Convertible bool `json:"convertible"` // ResourceID is for HA volume, set to '-1' for non-HA volume ResourceID int `json:"resourceID"` ReadyToInitialize bool `json:"readyToInitialize"` Initialized bool `json:"initialized"` Replicas []VolumeReplica `json:"replicas"` }
VolumeConfig is the configration of the volume, including the replicas
func (*VolumeConfig) DeepCopy ¶
func (in *VolumeConfig) DeepCopy() *VolumeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeConfig.
func (*VolumeConfig) DeepCopyInto ¶
func (in *VolumeConfig) DeepCopyInto(out *VolumeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeConfig) DeepEqual ¶
func (vc *VolumeConfig) DeepEqual(peer *VolumeConfig) bool
DeepEqual check if the two configs are equal completely or not
type VolumeGroupManager ¶
type VolumeGroupManager interface { Init(stopCh <-chan struct{}) ReconcileVolumeGroup(volGroup *LocalVolumeGroup) GetLocalVolumeGroupByName(lvgName string) (*LocalVolumeGroup, error) GetLocalVolumeGroupByLocalVolume(lvName string) (*LocalVolumeGroup, error) GetLocalVolumeGroupByPVC(pvcName string, pvcNamespace string) (*LocalVolumeGroup, error) }
type VolumeInfo ¶
type VolumeInfo struct { // LocalVolumeName is the name of the LocalVolume LocalVolumeName string `json:"localvolume,omitempty"` // PersistentVolumeClaimName is the name of the associated PVC PersistentVolumeClaimName string `json:"pvc,omitempty"` }
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.
type VolumeQoS ¶
type VolumeQoS struct { // Throughput defines the throughput of the volume Throughput string `json:"throughput,omitempty"` // IOPS defines the IOPS of the volume IOPS string `json:"iops,omitempty"` }
VolumeQoS is the QoS of the volume
func (*VolumeQoS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeQoS.
func (*VolumeQoS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeReplica ¶
type VolumeReplica struct { ID int `json:"id"` Hostname string `json:"hostname"` IP string `json:"ip"` Primary bool `json:"primary"` }
VolumeReplica contains informations of replica peer
func (*VolumeReplica) DeepCopy ¶
func (in *VolumeReplica) DeepCopy() *VolumeReplica
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeReplica.
func (*VolumeReplica) DeepCopyInto ¶
func (in *VolumeReplica) DeepCopyInto(out *VolumeReplica)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VolumeReplica) DeepEqual ¶
func (vr *VolumeReplica) DeepEqual(peer *VolumeReplica) bool
DeepEqual check if the two volumereplicas are equal completely or not
type VolumeScheduler ¶
type VolumeScheduler interface { Init() // schedule will schedule all replicas, and generate a valid VolumeConfig Allocate(vol *LocalVolume) (*VolumeConfig, error) GetNodeCandidates(vols []*LocalVolume) []*LocalStorageNode ConfigureVolumeOnAdditionalNodes(vol *LocalVolume, nodes []*LocalStorageNode) (*VolumeConfig, error) }
VolumeScheduler interface //go:generate mockgen -source=types.go -destination=../../../member/controller/scheduler/scheduler_mock.go -package=scheduler
type VolumeSnapshotAttr ¶
type VolumeSnapshotAttr struct { // Merging set true if snapshot is merging now Merging bool `json:"merging,omitempty"` // Invalid set true if snapshot is expiration Invalid bool `json:"invalid,omitempty"` }
VolumeSnapshotAttr defines attrs of volume, e.g. invalid, merging...
func (*VolumeSnapshotAttr) DeepCopy ¶
func (in *VolumeSnapshotAttr) DeepCopy() *VolumeSnapshotAttr
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotAttr.
func (*VolumeSnapshotAttr) DeepCopyInto ¶
func (in *VolumeSnapshotAttr) DeepCopyInto(out *VolumeSnapshotAttr)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
- doc.go
- event_types.go
- group.go
- localdisk_types.go
- localdiskaction_types.go
- localdiskclaim_types.go
- localdisknode_types.go
- localdiskvolume_types.go
- localstoragenode_types.go
- localvolume_types.go
- localvolumeconvert_types.go
- localvolumeexpand_types.go
- localvolumegroup_types.go
- localvolumemigrate_types.go
- localvolumereplica_types.go
- localvolumereplicasnapshot_types.go
- localvolumereplicasnapshotrestore_types.go
- localvolumesnapshot_types.go
- localvolumesnapshotrestore_types.go
- register.go
- resizepolicy_types.go
- types.go
- zz_generated.deepcopy.go