Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the local v1 API group +kubebuilder:object:generate=true +groupName=local.storage.openshift.io
Index ¶
Constants ¶
const ( LocalVolumeKind = "LocalVolume" LocalVolumeSetKind = "LocalVolumeSet" LocalVolumeDeviceLinkKind = "LocalVolumeDeviceLink" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "local.storage.openshift.io", Version: "v1"} // 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 DeviceLinkPolicy ¶
type DeviceLinkPolicy string
DeviceLinkPolicy defines how symlinks for given volumes should be treated by the LSO. Valid values are - None, CurrentLinkTarget and PreferredLinkTarget +kubebuilder:validation:Enum=None;CurrentLinkTarget;PreferredLinkTarget
const ( // DeviceLinkPolicyNone means no policy has been selected for // the device and LSO generates an alert if there is a mismatch between // .status.currentLinkTarget and .status.preferredLinkTarget DeviceLinkPolicyNone DeviceLinkPolicy = "None" // default // DeviceLinkPolicyCurrentLinkTarget silences the alert and // keeps the existing symlink pointing to .status.currentLinkTarget DeviceLinkPolicyCurrentLinkTarget DeviceLinkPolicy = "CurrentLinkTarget" // DeviceLinkPolicyPreferredLinkTarget silences the alert and // changes the symlink to point to .status.preferredLinkTarget DeviceLinkPolicyPreferredLinkTarget DeviceLinkPolicy = "PreferredLinkTarget" )
type LocalVolume ¶
type LocalVolume struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LocalVolumeSpec `json:"spec,omitempty"`
Status LocalVolumeStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumes,scope=Namespaced LocalVolume is the Schema for the localvolumes API
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) SetDefaults ¶
func (local *LocalVolume) SetDefaults()
SetDefaults sets values of log level and manage levels
type LocalVolumeDeviceLink ¶
type LocalVolumeDeviceLink struct {
metav1.TypeMeta `json:",inline"`
// metadata is the standard object's metadata and has
// ownerRef set to the LocalVolume or LocalVolumeSet object.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ObjectMeta `json:"metadata,omitempty"`
// spec holds user settable values for the device link
// +required
Spec LocalVolumeDeviceLinkSpec `json:"spec"`
// status holds observed values for the device link.
// if not set, this means local-storage-operator has not synced
// this particular volume yet on the node.
// +optional
Status LocalVolumeDeviceLinkStatus `json:"status,omitzero"`
}
LocalVolumeDeviceLink establishes a link between block devices on the node and PersistentVolumes created by Local Storage Operator. It stores discovered symlinks for the device and influences LSO's symlink selection process. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=localvolumedevicelinks,scope=Namespaced
func (*LocalVolumeDeviceLink) DeepCopy ¶
func (in *LocalVolumeDeviceLink) DeepCopy() *LocalVolumeDeviceLink
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeDeviceLink.
func (*LocalVolumeDeviceLink) DeepCopyInto ¶
func (in *LocalVolumeDeviceLink) DeepCopyInto(out *LocalVolumeDeviceLink)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeDeviceLink) DeepCopyObject ¶
func (in *LocalVolumeDeviceLink) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeDeviceLinkList ¶
type LocalVolumeDeviceLinkList struct {
metav1.TypeMeta `json:",inline"`
// metadata is the standard list's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
metav1.ListMeta `json:"metadata"`
Items []LocalVolumeDeviceLink `json:"items"`
}
LocalVolumeDeviceLinkList contains a list of device links +kubebuilder:object:root=true
func (*LocalVolumeDeviceLinkList) DeepCopy ¶
func (in *LocalVolumeDeviceLinkList) DeepCopy() *LocalVolumeDeviceLinkList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeDeviceLinkList.
func (*LocalVolumeDeviceLinkList) DeepCopyInto ¶
func (in *LocalVolumeDeviceLinkList) DeepCopyInto(out *LocalVolumeDeviceLinkList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LocalVolumeDeviceLinkList) DeepCopyObject ¶
func (in *LocalVolumeDeviceLinkList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LocalVolumeDeviceLinkSpec ¶
type LocalVolumeDeviceLinkSpec struct {
// persistentVolumeName is the name of the persistent volume linked to the device
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
PersistentVolumeName string `json:"persistentVolumeName"`
// nodeName is the name of the OpenShift node on which this
// LocalVolumeDeviceLink object exists
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
NodeName string `json:"nodeName,omitempty"`
// policy expresses how to manage symlinks for the device.
// "None" means no policy has been chosen, and will generate an alert if
// there is a mismatch between .status.currentLinkTarget and
// .status.preferredLinkTarget.
// "CurrentLinkTarget" silences the alert and keeps the existing symlink
// pointing to .status.currentLinkTarget.
// "PreferredLinkTarget" silences the alert and changes the symlink to point
// to .status.preferredLinkTarget.
// The default value is determined by local-storage-operator and is subject
// to change. In this version of operator, default is `None`.
// +optional
Policy DeviceLinkPolicy `json:"policy,omitempty"`
}
LocalVolumeDeviceLinkSpec defines the desired state of the device link
func (*LocalVolumeDeviceLinkSpec) DeepCopy ¶
func (in *LocalVolumeDeviceLinkSpec) DeepCopy() *LocalVolumeDeviceLinkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeDeviceLinkSpec.
func (*LocalVolumeDeviceLinkSpec) DeepCopyInto ¶
func (in *LocalVolumeDeviceLinkSpec) DeepCopyInto(out *LocalVolumeDeviceLinkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalVolumeDeviceLinkStatus ¶
type LocalVolumeDeviceLinkStatus struct {
// currentLinkTarget is the current devicePath being used by local storage operator
// This could be /dev/disk/by-id symlink if available but since LocalVolume objects
// allow users to specify different path, it may be user's specified value in
// LocalVolume object.
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=4096
CurrentLinkTarget string `json:"currentLinkTarget,omitempty"`
// preferredLinkTarget is the /dev/disk/by-id symlink for the device that the local storage
// operator evaluated as the most stable and the least error prone. The local storage operator
// recommends using this symlink, after a careful review by the cluster admin.
// +optional
// +kubebuilder:validation:MaxLength=4096
PreferredLinkTarget string `json:"preferredLinkTarget,omitempty"`
// validLinkTargets is the list of /dev/disk/by-id symlinks for the device that the local
// storage operator considers as valid. The list may contain at most 256 entries.
// +optional
// +listType=set
// +kubebuilder:validation:MaxItems=256
ValidLinkTargets []string `json:"validLinkTargets,omitempty"`
// persistentVolumeSymlinkPath is the symlink in /mnt/local-storage directory that points to
// the actual local device.
// This path is used by corresponding PersistentVolume (PV) object for all operations (e.g. mount).
// LSO creates and updates this symlink for the whole lifetime of the PV.
// This field is immutable once set, because the path in the corresponding
// PV object is immutable too.
// +optional
// +kubebuilder:validation:MaxLength=4096
// +kubebuilder:validation:XValidation:rule="self == oldSelf || oldSelf == ”",message="persistentVolumeSymlinkPath is immutable once set"
PersistentVolumeSymlinkPath string `json:"persistentVolumeSymlinkPath,omitempty"`
// filesystemUUID is the UUID of the filesystem found on the device (when available)
// +optional
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=4096
FilesystemUUID string `json:"filesystemUUID,omitempty"`
// conditions is a list of operator conditions.
// +optional
// +listType=map
// +listMapKey=type
Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"`
}
LocalVolumeDeviceLinkStatus stores the observed state of the device link
func (*LocalVolumeDeviceLinkStatus) DeepCopy ¶
func (in *LocalVolumeDeviceLinkStatus) DeepCopy() *LocalVolumeDeviceLinkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalVolumeDeviceLinkStatus.
func (*LocalVolumeDeviceLinkStatus) DeepCopyInto ¶
func (in *LocalVolumeDeviceLinkStatus) DeepCopyInto(out *LocalVolumeDeviceLinkStatus)
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 LocalVolumeSpec ¶
type LocalVolumeSpec struct {
// managementState indicates whether and how the operator should manage the component
// +optional
ManagementState operatorv1.ManagementState `json:"managementState,omitempty"`
// logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a
// simple way to manage coarse grained logging choices that operators have to interpret for their operands.
// +optional
LogLevel operatorv1.LogLevel `json:"logLevel,omitempty"`
// Nodes on which the provisoner must run
// +optional
NodeSelector *corev1.NodeSelector `json:"nodeSelector,omitempty"`
// List of storage class and devices they can match
StorageClassDevices []StorageClassDevice `json:"storageClassDevices,omitempty"`
// If specified, a list of tolerations to pass to the diskmaker and provisioner DaemonSets.
// +optional
Tolerations []corev1.Toleration `json:"tolerations,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 {
// ObservedGeneration is the last generation of this object that
// the operator has acted on.
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// state indicates what the operator has observed to be its current operational status.
State operatorv1.ManagementState `json:"managementState,omitempty"`
// Conditions is a list of conditions and their status.
Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"`
// readyReplicas indicates how many replicas are ready and at the desired state
ReadyReplicas int32 `json:"readyReplicas"`
// generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.
// +optional
Generations []operatorv1.GenerationStatus `json:"generations,omitempty"`
}
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 PersistentVolumeMode ¶
type PersistentVolumeMode string
PersistentVolumeMode describes how a volume is intended to be consumed, either Block or Filesystem.
const ( // PersistentVolumeBlock means the volume will not be formatted with a filesystem and will remain a raw block device. PersistentVolumeBlock PersistentVolumeMode = "Block" // PersistentVolumeFilesystem means the volume will be or is formatted with a filesystem. PersistentVolumeFilesystem PersistentVolumeMode = "Filesystem" )
type StorageClassDevice ¶
type StorageClassDevice struct {
// StorageClass name to use for set of matched devices
StorageClassName string `json:"storageClassName"`
// Volume mode. Raw or with file system
// + optional
VolumeMode PersistentVolumeMode `json:"volumeMode,omitempty"`
// File system type
// +optional
FSType string `json:"fsType,omitempty"`
// A list of device paths which would be chosen for local storage.
// For example - ["/dev/sda", "/dev/sdb", "/dev/disk/by-id/ata-crucial"]
DevicePaths []string `json:"devicePaths,omitempty"`
// This option will destroy all leftover data on the devices before they're used as PersistentVolumes. Use with care.
// +optional
ForceWipeDevicesAndDestroyAllData bool `json:"forceWipeDevicesAndDestroyAllData,omitempty"`
}
StorageClassDevice returns device configuration
func (*StorageClassDevice) DeepCopy ¶
func (in *StorageClassDevice) DeepCopy() *StorageClassDevice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassDevice.
func (*StorageClassDevice) DeepCopyInto ¶
func (in *StorageClassDevice) DeepCopyInto(out *StorageClassDevice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.