v1alpha1

package
v0.0.0-...-2a80d7f Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the local v1alpha1 API group +kubebuilder:object:generate=true +groupName=local.storage.openshift.io

Index

Constants

View Source
const (
	LocalVolumeSetKind = "LocalVolumeSet"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "local.storage.openshift.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
)

Functions

This section is empty.

Types

type DeviceInclusionSpec

type DeviceInclusionSpec struct {
	// Devices is the list of devices that should be used for automatic detection.
	// This would be one of the types supported by the local-storage operator. Currently,
	// the supported types are: disk, part. If the list is empty only `disk` types will be selected
	// +optional
	DeviceTypes []DeviceType `json:"deviceTypes,omitempty"`
	// DeviceMechanicalProperty denotes whether Rotational or NonRotational disks should be used.
	// by default, it selects both
	// +optional
	DeviceMechanicalProperties []DeviceMechanicalProperty `json:"deviceMechanicalProperties,omitempty"`
	// MinSize is the minimum size of the device which needs to be included. Defaults to `1Gi` if empty
	// +optional
	MinSize *resource.Quantity `json:"minSize,omitempty"`
	// MaxSize is the maximum size of the device which needs to be included
	// +optional
	MaxSize *resource.Quantity `json:"maxSize,omitempty"`
	// Models is a list of device models. If not empty, the device's model as outputted by lsblk needs
	// to contain at least one of these strings.
	// +optional
	Models []string `json:"models,omitempty"`
	// Vendors is a list of device vendors. If not empty, the device's model as outputted by lsblk needs
	// to contain at least one of these strings.
	// +optional
	Vendors []string `json:"vendors,omitempty"`
}

DeviceInclusionSpec holds the inclusion filter spec

func (*DeviceInclusionSpec) DeepCopy

func (in *DeviceInclusionSpec) DeepCopy() *DeviceInclusionSpec

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

func (*DeviceInclusionSpec) DeepCopyInto

func (in *DeviceInclusionSpec) DeepCopyInto(out *DeviceInclusionSpec)

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

type DeviceMechanicalProperty

type DeviceMechanicalProperty string

DeviceMechanicalProperty holds the device's mechanical spec. It can be rotational or nonRotational

const (
	// Rotational refers to magnetic disks
	Rotational DeviceMechanicalProperty = "Rotational"
	// NonRotational refers to ssds
	NonRotational DeviceMechanicalProperty = "NonRotational"
)

The mechanical properties of the devices

type DeviceState

type DeviceState string

DeviceState defines the observed state of the disk

const (
	// Available means that the device is available to use and a new persistent volume can be provisioned on it
	Available DeviceState = "Available"
	// NotAvailable means that the device is already used by some other process and shouldn't be used to provision a Persistent Volume
	NotAvailable DeviceState = "NotAvailable"
	// Unknown means that the state of the device can't be determined
	Unknown DeviceState = "Unknown"
)

type DeviceStatus

type DeviceStatus struct {
	// State shows the availability of the device
	State DeviceState `json:"state"`
}

DeviceStatus defines the observed state of the discovered devices

func (*DeviceStatus) DeepCopy

func (in *DeviceStatus) DeepCopy() *DeviceStatus

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

func (*DeviceStatus) DeepCopyInto

func (in *DeviceStatus) DeepCopyInto(out *DeviceStatus)

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

type DeviceType

type DeviceType string

DeviceType is the types that will be supported by the LSO.

const (
	// RawDisk represents a device-type of block disk
	RawDisk DeviceType = "disk"
	// Partition represents a device-type of partition
	Partition DeviceType = "part"
	// Loop type device
	Loop DeviceType = "loop"
	// Multipath device type
	MultiPath DeviceType = "mpath"
)

type DiscoveredDevice

type DiscoveredDevice struct {
	// DeviceID represents the persistent name of the device. For eg, /dev/disk/by-id/...
	DeviceID string `json:"deviceID"`
	// Path represents the device path. For eg, /dev/sdb
	Path string `json:"path"`
	// Model of the discovered device
	Model string `json:"model"`
	// Type of the discovered device
	Type DiscoveredDeviceType `json:"type"`
	// Vendor of the discovered device
	Vendor string `json:"vendor"`
	// Serial number of the disk
	Serial string `json:"serial"`
	// Size of the discovered device
	Size int64 `json:"size"`
	// Property represents whether the device type is rotational or not
	Property DeviceMechanicalProperty `json:"property"`
	// FSType represents the filesystem available on the device
	FSType string `json:"fstype"`
	// Status defines whether the device is available for use or not
	Status DeviceStatus `json:"status"`
}

DiscoveredDevice shows the list of discovered devices with their properties

func (*DiscoveredDevice) DeepCopy

func (in *DiscoveredDevice) DeepCopy() *DiscoveredDevice

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

func (*DiscoveredDevice) DeepCopyInto

func (in *DiscoveredDevice) DeepCopyInto(out *DiscoveredDevice)

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

type DiscoveredDeviceType

type DiscoveredDeviceType string

DiscoveredDeviceType is the types that will be discovered by the LSO.

const (
	// DiskType represents a device-type of block disk
	DiskType DiscoveredDeviceType = "disk"
	// PartType represents a device-type of partition
	PartType DiscoveredDeviceType = "part"
	// LVMType is an LVM type
	LVMType DiscoveredDeviceType = "lvm"
	// MultiPathType is a multipath type
	MultiPathType DiscoveredDeviceType = "mpath"
)

type DiscoveryPhase

type DiscoveryPhase string

DiscoveryPhase defines the observed phase of the discovery process

const (
	// Discovering represents that the continuous discovery of devices is in progress
	Discovering DiscoveryPhase = "Discovering"
	// DiscoveryFailed represents that the discovery process has failed
	DiscoveryFailed DiscoveryPhase = "DiscoveryFailed"
)

Different phases of the discovery process

type LocalVolumeDiscovery

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

	Spec   LocalVolumeDiscoverySpec   `json:"spec,omitempty"`
	Status LocalVolumeDiscoveryStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumediscoveries,scope=Namespaced LocalVolumeDiscovery is the Schema for the localvolumediscoveries API

func (*LocalVolumeDiscovery) DeepCopy

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

func (*LocalVolumeDiscovery) DeepCopyInto

func (in *LocalVolumeDiscovery) DeepCopyInto(out *LocalVolumeDiscovery)

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

func (*LocalVolumeDiscovery) DeepCopyObject

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

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

type LocalVolumeDiscoveryList

type LocalVolumeDiscoveryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LocalVolumeDiscovery `json:"items"`
}

LocalVolumeDiscoveryList contains a list of LocalVolumeDiscovery

func (*LocalVolumeDiscoveryList) DeepCopy

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

func (*LocalVolumeDiscoveryList) DeepCopyInto

func (in *LocalVolumeDiscoveryList) DeepCopyInto(out *LocalVolumeDiscoveryList)

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

func (*LocalVolumeDiscoveryList) DeepCopyObject

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

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

type LocalVolumeDiscoveryResult

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

	Spec   LocalVolumeDiscoveryResultSpec   `json:"spec,omitempty"`
	Status LocalVolumeDiscoveryResultStatus `json:"status,omitempty"`
}

LocalVolumeDiscoveryResult is the Schema for the localvolumediscoveryresults API

func (*LocalVolumeDiscoveryResult) DeepCopy

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

func (*LocalVolumeDiscoveryResult) DeepCopyInto

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

func (*LocalVolumeDiscoveryResult) DeepCopyObject

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

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

type LocalVolumeDiscoveryResultList

type LocalVolumeDiscoveryResultList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LocalVolumeDiscoveryResult `json:"items"`
}

LocalVolumeDiscoveryResultList contains a list of LocalVolumeDiscoveryResult

func (*LocalVolumeDiscoveryResultList) DeepCopy

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

func (*LocalVolumeDiscoveryResultList) DeepCopyInto

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

func (*LocalVolumeDiscoveryResultList) DeepCopyObject

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

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

type LocalVolumeDiscoveryResultSpec

type LocalVolumeDiscoveryResultSpec struct {
	// Node on which the devices are discovered
	NodeName string `json:"nodeName"`
}

LocalVolumeDiscoveryResultSpec defines the desired state of LocalVolumeDiscoveryResult

func (*LocalVolumeDiscoveryResultSpec) DeepCopy

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

func (*LocalVolumeDiscoveryResultSpec) DeepCopyInto

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

type LocalVolumeDiscoveryResultStatus

type LocalVolumeDiscoveryResultStatus struct {
	// DiscoveredTimeStamp is the last timestamp when the list of discovered devices was updated
	DiscoveredTimeStamp string `json:"discoveredTimeStamp,omitempty"`
	// DiscoveredDevices contains the list of devices on which LSO
	// is capable of creating LocalPVs
	// The devices in this list qualify these following conditions.
	// - it should be a non-removable device.
	// - it should not be a read-only device.
	// - it should not be mounted anywhere
	// - it should not be a boot device
	// - it should not have child partitions
	// +optional
	DiscoveredDevices []DiscoveredDevice `json:"discoveredDevices"`
}

LocalVolumeDiscoveryResultStatus defines the observed state of LocalVolumeDiscoveryResult

func (*LocalVolumeDiscoveryResultStatus) DeepCopy

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

func (*LocalVolumeDiscoveryResultStatus) DeepCopyInto

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

type LocalVolumeDiscoverySpec

type LocalVolumeDiscoverySpec struct {
	// Nodes on which the automatic detection policies must run.
	// +optional
	NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
	// If specified tolerations is the list of toleration that is passed to the
	// LocalVolumeDiscovery Daemon
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

LocalVolumeDiscoverySpec defines the desired state of LocalVolumeDiscovery

func (*LocalVolumeDiscoverySpec) DeepCopy

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

func (*LocalVolumeDiscoverySpec) DeepCopyInto

func (in *LocalVolumeDiscoverySpec) DeepCopyInto(out *LocalVolumeDiscoverySpec)

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

type LocalVolumeDiscoveryStatus

type LocalVolumeDiscoveryStatus struct {
	// Phase represents the current phase of discovery process
	// This is used by the OLM UI to provide status information
	// to the user
	Phase DiscoveryPhase `json:"phase,omitempty"`
	// Conditions are the list of conditions and their status.
	Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"`
	// observedGeneration is the last generation change the operator has dealt with
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

LocalVolumeDiscoveryStatus defines the observed state of LocalVolumeDiscovery

func (*LocalVolumeDiscoveryStatus) DeepCopy

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

func (*LocalVolumeDiscoveryStatus) DeepCopyInto

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

type LocalVolumeSet

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

	Spec   LocalVolumeSetSpec   `json:"spec,omitempty"`
	Status LocalVolumeSetStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumesets,scope=Namespaced LocalVolumeSet is the Schema for the localvolumesets API

func (*LocalVolumeSet) DeepCopy

func (in *LocalVolumeSet) DeepCopy() *LocalVolumeSet

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

func (*LocalVolumeSet) DeepCopyInto

func (in *LocalVolumeSet) DeepCopyInto(out *LocalVolumeSet)

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

func (*LocalVolumeSet) DeepCopyObject

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

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

type LocalVolumeSetList

type LocalVolumeSetList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LocalVolumeSet `json:"items"`
}

LocalVolumeSetList contains a list of LocalVolumeSet

func (*LocalVolumeSetList) DeepCopy

func (in *LocalVolumeSetList) DeepCopy() *LocalVolumeSetList

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

func (*LocalVolumeSetList) DeepCopyInto

func (in *LocalVolumeSetList) DeepCopyInto(out *LocalVolumeSetList)

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

func (*LocalVolumeSetList) DeepCopyObject

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

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

type LocalVolumeSetSpec

type LocalVolumeSetSpec struct {
	// Nodes on which the automatic detection policies must run.
	// +optional
	NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
	// StorageClassName to use for set of matched devices
	StorageClassName string `json:"storageClassName"`
	// MaxDeviceCount is the maximum number of Devices that needs to be detected per node.
	// If it is not specified, there will be no limit to the number of provisioned devices.
	// +optional
	MaxDeviceCount *int32 `json:"maxDeviceCount,omitempty"`
	// VolumeMode determines whether the PV created is Block or Filesystem.
	// It will default to Filesystem.
	// +optional
	VolumeMode localv1.PersistentVolumeMode `json:"volumeMode,omitempty"`
	// FSType type to create when volumeMode is Filesystem
	// +optional
	FSType string `json:"fsType,omitempty"`
	// If specified, a list of tolerations to pass to the discovery daemons.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// DeviceInclusionSpec is the filtration rule for including a device in the device discovery
	// +optional
	DeviceInclusionSpec *DeviceInclusionSpec `json:"deviceInclusionSpec,omitempty"`
}

LocalVolumeSetSpec defines the desired state of LocalVolumeSet

func (*LocalVolumeSetSpec) DeepCopy

func (in *LocalVolumeSetSpec) DeepCopy() *LocalVolumeSetSpec

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

func (*LocalVolumeSetSpec) DeepCopyInto

func (in *LocalVolumeSetSpec) DeepCopyInto(out *LocalVolumeSetSpec)

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

type LocalVolumeSetStatus

type LocalVolumeSetStatus struct {
	// Conditions is a list of conditions and their status.
	Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"`
	// TotalProvisionedDeviceCount is the count of the total devices over which the PVs has been provisioned
	TotalProvisionedDeviceCount *int32 `json:"totalProvisionedDeviceCount,omitempty"`
	// observedGeneration is the last generation change the operator has dealt with
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

LocalVolumeSetStatus defines the observed state of LocalVolumeSet

func (*LocalVolumeSetStatus) DeepCopy

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

func (*LocalVolumeSetStatus) DeepCopyInto

func (in *LocalVolumeSetStatus) DeepCopyInto(out *LocalVolumeSetStatus)

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

Jump to

Keyboard shortcuts

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