Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the lvm v1alpha1 API group +kubebuilder:object:generate=true +groupName=lvm.topolvm.io
Index ¶
- Constants
- Variables
- type ChunkSizeCalculationPolicy
- type DeviceClass
- type DeviceClassStatus
- type DeviceDiscoveryPolicy
- type DeviceFilesystemType
- type DevicePath
- type DeviceSelector
- type ExcludedDevice
- type LVMCluster
- type LVMClusterList
- type LVMClusterSpec
- type LVMClusterStatus
- type LVMStateType
- type LVMVolumeGroup
- type LVMVolumeGroupList
- type LVMVolumeGroupNodeStatus
- type LVMVolumeGroupNodeStatusList
- type LVMVolumeGroupNodeStatusSpec
- type LVMVolumeGroupNodeStatusStatus
- type LVMVolumeGroupSpec
- type LVMVolumeGroupStatus
- type MetadataSizePolicy
- type NodeStatus
- type Storage
- type ThinPoolConfig
- type VGStatus
- type VGStatusType
Constants ¶
const ( // ResourcesAvailable indicates whether the resources maintained by the operator are reconciled without any issues. ResourcesAvailable = "ResourcesAvailable" // VolumeGroupsReady indicates whether the volume groups maintained by the operator are in a ready state. VolumeGroupsReady = "VolumeGroupsReady" )
const ThinPoolConfigMaxRecommendedSizePercent = 90
ThinPoolConfigMaxRecommendedSizePercent is the maximum recommended size percent for the thin pool.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "lvm.topolvm.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( ThinPoolMetadataSizeMinimum = resource.MustParse("2Mi") ThinPoolMetadataSizeMaximum = resource.MustParse("16Gi") ThinPoolMetadataSizeDefault = resource.MustParse("1Gi") )
var ( ChunkSizeMinimum = resource.MustParse("64Ki") ChunkSizeDefault = resource.MustParse("128Ki") ChunkSizeMaximum = resource.MustParse("1Gi") )
var ( ErrDeviceClassNotFound = errors.New("DeviceClass not found in the LVMCluster") ErrThinPoolConfigNotSet = errors.New("ThinPoolConfig is not set for the DeviceClass") ErrNodeSelectorNotSet = errors.New("NodeSelector is not set for the DeviceClass") ErrInvalidNamespace = errors.New("invalid namespace was supplied") ErrOnlyOneDefaultDeviceClassAllowed = errors.New("only one default deviceClass is allowed") ErrPathsOrOptionalPathsMandatoryWithNonNilDeviceSelector = errors.New("either paths or optionalPaths must be specified when DeviceSelector is specified") ErrEmptyPathsWithMultipleDeviceClasses = errors.New("path list should not be empty when there are multiple deviceClasses") ErrDuplicateLVMCluster = errors.New("duplicate LVMClusters are not allowed, remove the old LVMCluster or work with the existing instance") ErrThinPoolConfigCannotBeChanged = errors.New("ThinPoolConfig can not be changed") ErrThinPoolMetadataSizeCanOnlyBeIncreased = errors.New("thin pool metadata size can only be increased") ErrNodeSelectorCannotBeChanged = errors.New("NodeSelector can not be changed") ErrDevicePathsCannotBeAddedInUpdate = errors.New("device paths can not be added after a device class has been initialized") ErrForceWipeOptionCannotBeChanged = errors.New("ForceWipeDevicesAndDestroyAllData can not be changed") )
Functions ¶
This section is empty.
Types ¶
type ChunkSizeCalculationPolicy ¶
type ChunkSizeCalculationPolicy string
ChunkSizeCalculationPolicy specifies the policy to calculate the chunk size for the underlying volume. for more information, see man lvm.
const ( // ChunkSizeCalculationPolicyHost calculates the chunk size based on the lvm2 host setting on the node. ChunkSizeCalculationPolicyHost ChunkSizeCalculationPolicy = "Host" // ChunkSizeCalculationPolicyStatic calculates the chunk size based on a static size attribute. ChunkSizeCalculationPolicyStatic ChunkSizeCalculationPolicy = "Static" )
type DeviceClass ¶
type DeviceClass struct {
// Name specifies a name for the device class
// +kubebuilder:validation:MaxLength=245
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
Name string `json:"name,omitempty"`
// DeviceSelector contains the configuration to specify paths to the devices that you want to add to the LVM volume group, and force wipe the selected devices.
// +optional
DeviceSelector *DeviceSelector `json:"deviceSelector,omitempty"`
// NodeSelector contains the configuration to choose the nodes on which you want to create the LVM volume group. If this field is not configured, all nodes without no-schedule taints are considered.
// +optional
NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
// ThinPoolConfig contains the configuration to create a thin pool in the LVM volume group. If you exclude this field, logical volumes are thick provisioned.
// +optional
ThinPoolConfig *ThinPoolConfig `json:"thinPoolConfig,omitempty"`
// Default is a flag to indicate that a device class is the default. You can configure only a single default device class.
// +optional
Default bool `json:"default,omitempty"`
// FilesystemType sets the default filesystem type for persistent volumes created from this device class.
// This determines the filesystem used when provisioning PVCs with volumeMode: Filesystem.
// Select either `ext4` or `xfs`. This does not filter devices during discovery.
// +kubebuilder:validation:Enum=xfs;ext4;""
// +kubebuilder:default=xfs
// +optional
FilesystemType DeviceFilesystemType `json:"fstype,omitempty"`
}
func (*DeviceClass) DeepCopy ¶
func (in *DeviceClass) DeepCopy() *DeviceClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass.
func (*DeviceClass) DeepCopyInto ¶
func (in *DeviceClass) DeepCopyInto(out *DeviceClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceClassStatus ¶
type DeviceClassStatus struct {
// Name is the name of the deviceclass
Name string `json:"name,omitempty"`
// NodeStatus tells if the deviceclass was created on the node
NodeStatus []NodeStatus `json:"nodeStatus,omitempty"`
}
DeviceClassStatus defines the observed status of the deviceclass across all nodes
func (*DeviceClassStatus) DeepCopy ¶
func (in *DeviceClassStatus) DeepCopy() *DeviceClassStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassStatus.
func (*DeviceClassStatus) DeepCopyInto ¶
func (in *DeviceClassStatus) DeepCopyInto(out *DeviceClassStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceDiscoveryPolicy ¶
type DeviceDiscoveryPolicy string
const ( // DeviceDiscoveryPolicyPreconfigured indicates the devices are preconfigured through a DeviceSelector. DeviceDiscoveryPolicyPreconfigured DeviceDiscoveryPolicy = "Preconfigured" // DeviceDiscoveryPolicyRuntimeDynamic indicates the devices are added to the VG dynamically if they are present at runtime. DeviceDiscoveryPolicyRuntimeDynamic DeviceDiscoveryPolicy = "RuntimeDynamic" )
type DeviceFilesystemType ¶
type DeviceFilesystemType string
const ( FilesystemTypeExt4 DeviceFilesystemType = "ext4" FilesystemTypeXFS DeviceFilesystemType = "xfs" )
type DevicePath ¶
type DevicePath string
func (DevicePath) Unresolved ¶
func (d DevicePath) Unresolved() string
type DeviceSelector ¶
type DeviceSelector struct {
// Paths specify the device paths.
// +optional
Paths []DevicePath `json:"paths,omitempty"`
// OptionalPaths specify the optional device paths.
// +optional
OptionalPaths []DevicePath `json:"optionalPaths,omitempty"`
// ForceWipeDevicesAndDestroyAllData is a flag to force wipe the selected devices.
// This wipes the file signatures on the devices. Use this feature with caution.
// Force wipe the devices only when you know that they do not contain any important data.
// +optional
ForceWipeDevicesAndDestroyAllData *bool `json:"forceWipeDevicesAndDestroyAllData,omitempty"`
}
DeviceSelector specifies the list of criteria that have to match before a device is assigned
func (*DeviceSelector) DeepCopy ¶
func (in *DeviceSelector) DeepCopy() *DeviceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector.
func (*DeviceSelector) DeepCopyInto ¶
func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExcludedDevice ¶
type ExcludedDevice struct {
// Name is the device that was filtered
Name string `json:"name"`
// Reasons are the human-readable reasons why the device was excluded from the volume group
Reasons []string `json:"reasons"`
}
func (*ExcludedDevice) DeepCopy ¶
func (in *ExcludedDevice) DeepCopy() *ExcludedDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExcludedDevice.
func (*ExcludedDevice) DeepCopyInto ¶
func (in *ExcludedDevice) DeepCopyInto(out *ExcludedDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMCluster ¶
type LVMCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LVMClusterSpec `json:"spec,omitempty"`
Status LVMClusterStatus `json:"status,omitempty"`
}
LVMCluster is the Schema for the lvmclusters API
func (*LVMCluster) DeepCopy ¶
func (in *LVMCluster) DeepCopy() *LVMCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMCluster.
func (*LVMCluster) DeepCopyInto ¶
func (in *LVMCluster) DeepCopyInto(out *LVMCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMCluster) DeepCopyObject ¶
func (in *LVMCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*LVMCluster) SetupWebhookWithManager ¶
func (l *LVMCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
type LVMClusterList ¶
type LVMClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LVMCluster `json:"items"`
}
LVMClusterList contains a list of LVMCluster
func (*LVMClusterList) DeepCopy ¶
func (in *LVMClusterList) DeepCopy() *LVMClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMClusterList.
func (*LVMClusterList) DeepCopyInto ¶
func (in *LVMClusterList) DeepCopyInto(out *LVMClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMClusterList) DeepCopyObject ¶
func (in *LVMClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LVMClusterSpec ¶
type LVMClusterSpec struct {
// Tolerations to apply to nodes to act on
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// Storage contains the device class configuration for local storage devices.
// +Optional
Storage Storage `json:"storage,omitempty"`
}
LVMClusterSpec defines the desired state of LVMCluster
func (*LVMClusterSpec) DeepCopy ¶
func (in *LVMClusterSpec) DeepCopy() *LVMClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMClusterSpec.
func (*LVMClusterSpec) DeepCopyInto ¶
func (in *LVMClusterSpec) DeepCopyInto(out *LVMClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMClusterStatus ¶
type LVMClusterStatus struct {
// Ready describes if the LVMCluster is ready.
// +optional
Ready bool `json:"ready,omitempty"`
// State describes the LVMCluster state.
// +optional
State LVMStateType `json:"state,omitempty"`
// Conditions describes the state of the resource.
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// DeviceClassStatuses describes the status of all deviceClasses
DeviceClassStatuses []DeviceClassStatus `json:"deviceClassStatuses,omitempty"`
}
LVMClusterStatus defines the observed state of LVMCluster
func (*LVMClusterStatus) DeepCopy ¶
func (in *LVMClusterStatus) DeepCopy() *LVMClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMClusterStatus.
func (*LVMClusterStatus) DeepCopyInto ¶
func (in *LVMClusterStatus) DeepCopyInto(out *LVMClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMStateType ¶
type LVMStateType string
const ( // LVMStatusProgressing means that the lvmcluster creation is in progress LVMStatusProgressing LVMStateType = "Progressing" // LVMStatusReady means that the lvmcluster has been created and is Ready LVMStatusReady LVMStateType = "Ready" // LVMStatusFailed means that the lvmcluster could not be created LVMStatusFailed LVMStateType = "Failed" // LVMStatusDegraded means that the lvmcluster has been created but is not using the specified config LVMStatusDegraded LVMStateType = "Degraded" // LVMStatusUnknown means that the lvmcluster has been in an unknown state LVMStatusUnknown LVMStateType = "Unknown" )
type LVMVolumeGroup ¶
type LVMVolumeGroup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LVMVolumeGroupSpec `json:"spec,omitempty"`
Status LVMVolumeGroupStatus `json:"status,omitempty"`
}
LVMVolumeGroup is the Schema for the lvmvolumegroups API
func (*LVMVolumeGroup) DeepCopy ¶
func (in *LVMVolumeGroup) DeepCopy() *LVMVolumeGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroup.
func (*LVMVolumeGroup) DeepCopyInto ¶
func (in *LVMVolumeGroup) DeepCopyInto(out *LVMVolumeGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMVolumeGroup) DeepCopyObject ¶
func (in *LVMVolumeGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LVMVolumeGroupList ¶
type LVMVolumeGroupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LVMVolumeGroup `json:"items"`
}
LVMVolumeGroupList contains a list of LVMVolumeGroup
func (*LVMVolumeGroupList) DeepCopy ¶
func (in *LVMVolumeGroupList) DeepCopy() *LVMVolumeGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupList.
func (*LVMVolumeGroupList) DeepCopyInto ¶
func (in *LVMVolumeGroupList) DeepCopyInto(out *LVMVolumeGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMVolumeGroupList) DeepCopyObject ¶
func (in *LVMVolumeGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LVMVolumeGroupNodeStatus ¶
type LVMVolumeGroupNodeStatus struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LVMVolumeGroupNodeStatusSpec `json:"spec,omitempty"`
Status LVMVolumeGroupNodeStatusStatus `json:"status,omitempty"`
}
LVMVolumeGroupNodeStatus is the Schema for the lvmvolumegroupnodestatuses API
func (*LVMVolumeGroupNodeStatus) DeepCopy ¶
func (in *LVMVolumeGroupNodeStatus) DeepCopy() *LVMVolumeGroupNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupNodeStatus.
func (*LVMVolumeGroupNodeStatus) DeepCopyInto ¶
func (in *LVMVolumeGroupNodeStatus) DeepCopyInto(out *LVMVolumeGroupNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMVolumeGroupNodeStatus) DeepCopyObject ¶
func (in *LVMVolumeGroupNodeStatus) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LVMVolumeGroupNodeStatusList ¶
type LVMVolumeGroupNodeStatusList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LVMVolumeGroupNodeStatus `json:"items"`
}
LVMVolumeGroupNodeStatusList contains a list of LVMVolumeGroupNodeStatus
func (*LVMVolumeGroupNodeStatusList) DeepCopy ¶
func (in *LVMVolumeGroupNodeStatusList) DeepCopy() *LVMVolumeGroupNodeStatusList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupNodeStatusList.
func (*LVMVolumeGroupNodeStatusList) DeepCopyInto ¶
func (in *LVMVolumeGroupNodeStatusList) DeepCopyInto(out *LVMVolumeGroupNodeStatusList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LVMVolumeGroupNodeStatusList) DeepCopyObject ¶
func (in *LVMVolumeGroupNodeStatusList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LVMVolumeGroupNodeStatusSpec ¶
type LVMVolumeGroupNodeStatusSpec struct {
// NodeStatus contains the per node status of the VG
LVMVGStatus []VGStatus `json:"nodeStatus,omitempty"`
}
LVMVolumeGroupNodeStatusSpec defines the desired state of LVMVolumeGroupNodeStatus
func (*LVMVolumeGroupNodeStatusSpec) DeepCopy ¶
func (in *LVMVolumeGroupNodeStatusSpec) DeepCopy() *LVMVolumeGroupNodeStatusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupNodeStatusSpec.
func (*LVMVolumeGroupNodeStatusSpec) DeepCopyInto ¶
func (in *LVMVolumeGroupNodeStatusSpec) DeepCopyInto(out *LVMVolumeGroupNodeStatusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMVolumeGroupNodeStatusStatus ¶
type LVMVolumeGroupNodeStatusStatus struct {
}
LVMVolumeGroupNodeStatusStatus defines the observed state of LVMVolumeGroupNodeStatus
func (*LVMVolumeGroupNodeStatusStatus) DeepCopy ¶
func (in *LVMVolumeGroupNodeStatusStatus) DeepCopy() *LVMVolumeGroupNodeStatusStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupNodeStatusStatus.
func (*LVMVolumeGroupNodeStatusStatus) DeepCopyInto ¶
func (in *LVMVolumeGroupNodeStatusStatus) DeepCopyInto(out *LVMVolumeGroupNodeStatusStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMVolumeGroupSpec ¶
type LVMVolumeGroupSpec struct {
// DeviceSelector is a set of rules that should match for a device to be included in this TopoLVMCluster
// +optional
DeviceSelector *DeviceSelector `json:"deviceSelector,omitempty"`
// NodeSelector chooses nodes
// +optional
NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
// ThinPoolConfig contains configurations for the thin-pool
// +optional
ThinPoolConfig *ThinPoolConfig `json:"thinPoolConfig,omitempty"`
// Default is a flag to indicate whether the device-class is the default
// +optional
Default bool `json:"default,omitempty"`
}
LVMVolumeGroupSpec defines the desired state of LVMVolumeGroup
func (*LVMVolumeGroupSpec) DeepCopy ¶
func (in *LVMVolumeGroupSpec) DeepCopy() *LVMVolumeGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupSpec.
func (*LVMVolumeGroupSpec) DeepCopyInto ¶
func (in *LVMVolumeGroupSpec) DeepCopyInto(out *LVMVolumeGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LVMVolumeGroupStatus ¶
type LVMVolumeGroupStatus struct {
}
LVMVolumeGroupStatus defines the observed state of LVMVolumeGroup
func (*LVMVolumeGroupStatus) DeepCopy ¶
func (in *LVMVolumeGroupStatus) DeepCopy() *LVMVolumeGroupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LVMVolumeGroupStatus.
func (*LVMVolumeGroupStatus) DeepCopyInto ¶
func (in *LVMVolumeGroupStatus) DeepCopyInto(out *LVMVolumeGroupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetadataSizePolicy ¶ added in v4.18.0
type MetadataSizePolicy string
MetadataSizePolicy specifies the policy to calculate the metadata size for the underlying volume.
const ( // MetadataSizePolicyHost calculates the metadata size based on the lvm2 default settings. MetadataSizePolicyHost MetadataSizePolicy = "Host" // MetadataSizePolicyStatic calculates the metadata size based on a static size attribute. MetadataSizePolicyStatic MetadataSizePolicy = "Static" )
type NodeStatus ¶
type NodeStatus struct {
// Node is the name of the node
Node string `json:"node,omitempty"`
VGStatus `json:",inline"`
}
NodeStatus defines the observed state of the deviceclass on the node
func (*NodeStatus) DeepCopy ¶
func (in *NodeStatus) DeepCopy() *NodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
func (*NodeStatus) DeepCopyInto ¶
func (in *NodeStatus) DeepCopyInto(out *NodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct {
// DeviceClasses contains the configuration to assign the local storage devices to the LVM volume groups that you can use to provision persistent volume claims (PVCs).
// +Optional
DeviceClasses []DeviceClass `json:"deviceClasses,omitempty"`
}
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThinPoolConfig ¶
type ThinPoolConfig struct {
// Name specifies a name for the thin pool.
// +kubebuilder:validation:Required
// +required
Name string `json:"name"`
// SizePercent specifies the percentage of space in the LVM volume group for creating the thin pool.
// If the size configuration is 100, the whole disk will be used.
// By default, 90% of the disk is used for the thin pool to allow for data or metadata expansion later on.
// +kubebuilder:default=90
// +kubebuilder:validation:Minimum=10
// +kubebuilder:validation:Maximum=100
SizePercent int `json:"sizePercent,omitempty"`
// OverProvisionRatio specifies a factor by which you can provision additional storage based on the available storage in the thin pool. To prevent over-provisioning through validation, set this field to 1.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Required
// +required
OverprovisionRatio int `json:"overprovisionRatio"`
// ChunkSizeCalculationPolicy specifies the policy to calculate the chunk size for the underlying volume.
// When set to Host, the chunk size is calculated based on the lvm2 host setting on the node.
// When set to Static, the chunk size is calculated based on the static size attribute provided within ChunkSize.
// +kubebuilder:default=Static
// +kubebuilder:validation:Enum=Host;Static
// +optional
ChunkSizeCalculationPolicy ChunkSizeCalculationPolicy `json:"chunkSizeCalculationPolicy,omitempty"`
// ChunkSize specifies the statically calculated chunk size for the thin pool.
// Thus, It is only used when the ChunkSizeCalculationPolicy is set to Static.
// No ChunkSize with a ChunkSizeCalculationPolicy set to Static will result in a default chunk size of 128Ki.
// It can be between 64Ki and 1Gi due to the underlying limitations of lvm2.
// +optional
ChunkSize *resource.Quantity `json:"chunkSize,omitempty"`
// MetadataSize specifies metadata size for thin pool. It used only when MetadataSizeCalculationPolicy
// is set to Static. No MetadataSize with a MetadataSizeCalculationPolicy set to Static will result in
// default metadata size of 1Gi. It can be between 2Mi and 16Gi due to the underlying limitations of lvm2.
// +optional
MetadataSize *resource.Quantity `json:"metadataSize,omitempty"`
// MetadataSizeCalculationPolicy specifies the policy to calculate metadata size for the underlying volume.
// When set to Host, the metadata size is calculated based on lvm2 default settings
// When set to Static, the metadata size is calculated based on the static size attribute provided within MetadataSize
// +kubebuilder:default=Host
// +kubebuilder:validation:Enum=Host;Static
// +optional
MetadataSizeCalculationPolicy MetadataSizePolicy `json:"metadataSizeCalculationPolicy,omitempty"`
}
func (*ThinPoolConfig) DeepCopy ¶
func (in *ThinPoolConfig) DeepCopy() *ThinPoolConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThinPoolConfig.
func (*ThinPoolConfig) DeepCopyInto ¶
func (in *ThinPoolConfig) DeepCopyInto(out *ThinPoolConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VGStatus ¶
type VGStatus struct {
// Name is the name of the volume group
Name string `json:"name,omitempty"`
// Status tells if the volume group was created on the node
Status VGStatusType `json:"status,omitempty"`
// Reason provides more detail on the volume group creation status
Reason string `json:"reason,omitempty"`
// Devices is the list of devices used by the volume group
Devices []string `json:"devices,omitempty"`
// Excluded contains the per node status of applied device exclusions that were picked up via selector,
// but were not used for other reasons.
Excluded []ExcludedDevice `json:"excluded,omitempty"`
// DeviceDiscoveryPolicy is a field to indicate whether the devices are discovered
// at runtime or preconfigured through a DeviceSelector
// Setting this to DeviceDiscoveryPolicyPreconfigured indicates the devices are preconfigured through a DeviceSelector.
// Setting this to DeviceDiscoveryPolicyRuntimeDynamic indicates the devices are added to the VG dynamically if they are present at runtime.
// By default, the value is set to RuntimeDynamic.
// +kubebuilder:validation:Enum=Preconfigured;RuntimeDynamic
// +kubebuilder:default=RuntimeDynamic
// +kubebuilder:validation:Required
DeviceDiscoveryPolicy DeviceDiscoveryPolicy `json:"deviceDiscoveryPolicy,omitempty"`
}
func (*VGStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VGStatus.
func (*VGStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VGStatusType ¶
type VGStatusType string
const ( // VGStatusProgressing means that the VG creation is still in progress VGStatusProgressing VGStatusType = "Progressing" // VGStatusReady means that the vg has been created and is Ready VGStatusReady VGStatusType = "Ready" // VGStatusFailed means that the VG could not be created VGStatusFailed VGStatusType = "Failed" // VGStatusDegraded means that the VG has been created but is not using the specified config VGStatusDegraded VGStatusType = "Degraded" )