shared

package
v1.10.9 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package shared contains types and functions used by API definitions operators package +k8s:deepcopy-gen=package,register +groupName=piraeus.linbit.com

Index

Constants

View Source
const (
	// ModuleInjectionNone means that no module will be injected
	ModuleInjectionNone = "None"
	// ModuleInjectionCompile means that the module will be compiled from sources available on the host
	ModuleInjectionCompile = "Compile"
	// ModuleInjectionShippedModules means that a module included in the injector image will be used
	ModuleInjectionShippedModules = "ShippedModules"
	// ModuleInjectionDepsOnly means we only inject already present modules on the host for LINSTOR layers
	ModuleInjectionDepsOnly = "DepsOnly"
)
View Source
const (
	LogLevelTrace = "trace"
	LogLevelDebug = "debug"
	LogLevelInfo  = "info"
	LogLevelWarn  = "warn"
	LogLevelError = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonPhysicalStorageOptions added in v1.2.0

type CommonPhysicalStorageOptions struct {
	// List of device paths that should make up the VG
	// +optional
	DevicePaths []string `json:"devicePaths,omitempty"`
}

func (*CommonPhysicalStorageOptions) DeepCopy added in v1.2.0

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

func (*CommonPhysicalStorageOptions) DeepCopyInto added in v1.2.0

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

func (*CommonPhysicalStorageOptions) GetDevicePaths added in v1.2.0

func (in *CommonPhysicalStorageOptions) GetDevicePaths() []string

type CommonStoragePoolOptions added in v1.2.0

type CommonStoragePoolOptions struct {
	// Name of the storage pool.
	Name string `json:"name"`
}

func (*CommonStoragePoolOptions) DeepCopy added in v1.2.0

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

func (*CommonStoragePoolOptions) DeepCopyInto added in v1.2.0

func (in *CommonStoragePoolOptions) DeepCopyInto(out *CommonStoragePoolOptions)

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

func (*CommonStoragePoolOptions) GetName added in v1.2.0

func (in *CommonStoragePoolOptions) GetName() string

type KernelModuleInjectionMode

type KernelModuleInjectionMode string

KernelModuleInjectionMode describes the source for injecting a kernel module

type LinstorClientConfig

type LinstorClientConfig struct {
	// Name of the secret containing:
	// (a) `ca.crt`: root certificate used to validate HTTPS connections with Linstor (PEM format, without password)
	// (b) `tls.key`: client key used by the linstor client (PEM format, without password)
	// (c) `tls.crt`: client certificate matching the client key (PEM format, without password)
	// If set, HTTPS is used for connecting and authenticating with linstor
	// +optional
	LinstorHttpsClientSecret string `json:"linstorHttpsClientSecret"`
}

func (*LinstorClientConfig) DeepCopy

func (in *LinstorClientConfig) DeepCopy() *LinstorClientConfig

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

func (*LinstorClientConfig) DeepCopyInto

func (in *LinstorClientConfig) DeepCopyInto(out *LinstorClientConfig)

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

type LinstorSSLConfig

type LinstorSSLConfig string

LinstorSSLConfig is the name of the k8s secret that holds the key (called `keystore.jks`) and the trusted certificates (called `certificates.jks`)

func (*LinstorSSLConfig) IsPlain

func (lsc *LinstorSSLConfig) IsPlain() bool

func (*LinstorSSLConfig) Port

func (lsc *LinstorSSLConfig) Port() int32

func (*LinstorSSLConfig) Type

func (lsc *LinstorSSLConfig) Type() string

type LogLevel added in v1.7.1

type LogLevel string

func (LogLevel) ToLinstor added in v1.7.1

func (l LogLevel) ToLinstor() lapi.LogLevel

type NodeStatus

type NodeStatus struct {
	// Indicates if the node has been created on the controller.
	RegisteredOnController bool `json:"registeredOnController"`
	// The hostname of the kubelet running the node
	NodeName string `json:"nodeName"`
}

NodeStatus simple status of the node in the linstor cluster.

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 PhysicalStorageCreator added in v1.2.0

type PhysicalStorageCreator interface {
	StoragePool
	GetDevicePaths() []string
	ToPhysicalStorageCreate() lapi.PhysicalStorageCreate
}

+kubebuilder:object:generate=false

type PriorityClassName

type PriorityClassName string

PriorityClassName is the name PriorityClass associated with all pods for this resource. Can be left empty to use the default PriorityClass.

func (*PriorityClassName) GetName

func (pcn *PriorityClassName) GetName(namespace string) string

type SatelliteStatus

type SatelliteStatus struct {
	NodeStatus `json:",inline"`
	// As indicated by Linstor
	ConnectionStatus string `json:"connectionStatus"`
	// StoragePoolStatuses by storage pool name.
	StoragePoolStatuses []*StoragePoolStatus `json:"storagePoolStatus"`
}

SatelliteStatus should provide all the information that the reconsile loop needs to manage the operation of the LINSTOR Satellite.

func (*SatelliteStatus) DeepCopy

func (in *SatelliteStatus) DeepCopy() *SatelliteStatus

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

func (*SatelliteStatus) DeepCopyInto

func (in *SatelliteStatus) DeepCopyInto(out *SatelliteStatus)

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

type StoragePool

type StoragePool interface {
	GetName() string
	ToLinstorStoragePool() lapi.StoragePool
}

StoragePool is the generalized type of storage pools. +kubebuilder:object:generate=false

type StoragePoolLVM

type StoragePoolLVM struct {
	CommonStoragePoolOptions     `json:",inline"`
	CommonPhysicalStorageOptions `json:",inline"`

	// Name of underlying lvm group
	VolumeGroup string `json:"volumeGroup"`

	// Enable the Virtual Data Optimizer (VDO) on the volume group.
	// +optional
	VDO bool `json:"vdo,omitempty"`

	// Set LVM RaidLevel
	// +optional
	RaidLevel string `json:"raidLevel,omitempty"`

	// Set VDO logical volume size
	VdoLogicalSizeKib int32 `json:"vdoLogicalSizeKib,omitempty"`

	// Set VDO slab size
	VdoSlabSizeKib int32 `json:"vdoSlabSizeKib,omitempty"`
}

StoragePoolLVM represents LVM storage pool to be managed by a LinstorSatelliteSet

func (*StoragePoolLVM) DeepCopy

func (in *StoragePoolLVM) DeepCopy() *StoragePoolLVM

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

func (*StoragePoolLVM) DeepCopyInto

func (in *StoragePoolLVM) DeepCopyInto(out *StoragePoolLVM)

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

func (*StoragePoolLVM) ToLinstorStoragePool

func (in *StoragePoolLVM) ToLinstorStoragePool() lapi.StoragePool

ToLinstorStoragePool returns lapi.StoragePool presentation of the StoragePoolLVM

func (*StoragePoolLVM) ToPhysicalStorageCreate added in v1.2.0

func (in *StoragePoolLVM) ToPhysicalStorageCreate() lapi.PhysicalStorageCreate

type StoragePoolLVMThin

type StoragePoolLVMThin struct {
	CommonStoragePoolOptions     `json:",inline"`
	CommonPhysicalStorageOptions `json:",inline"`

	// Name of underlying lvm group
	VolumeGroup string `json:"volumeGroup"`

	// Name of underlying lvm thin volume
	ThinVolume string `json:"thinVolume"`

	// Set LVM RaidLevel
	// +optional
	RaidLevel string `json:"raidLevel,omitempty"`
}

StoragePoolLVMThin represents LVM Thin storage pool to be managed by a LinstorSatelliteSet.

func (*StoragePoolLVMThin) CreatedVolumeGroup added in v1.2.0

func (in *StoragePoolLVMThin) CreatedVolumeGroup() string

func (*StoragePoolLVMThin) DeepCopy

func (in *StoragePoolLVMThin) DeepCopy() *StoragePoolLVMThin

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

func (*StoragePoolLVMThin) DeepCopyInto

func (in *StoragePoolLVMThin) DeepCopyInto(out *StoragePoolLVMThin)

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

func (*StoragePoolLVMThin) ToLinstorStoragePool

func (in *StoragePoolLVMThin) ToLinstorStoragePool() lapi.StoragePool

ToLinstorStoragePool returns lapi.StoragePool presentation of the StoragePoolLVMThin

func (*StoragePoolLVMThin) ToPhysicalStorageCreate added in v1.2.0

func (in *StoragePoolLVMThin) ToPhysicalStorageCreate() lapi.PhysicalStorageCreate

type StoragePoolStatus

type StoragePoolStatus struct {
	// The name of the storage pool.
	Name string `json:"name"`
	// The hostname of the kubelet hosting the storage pool.
	NodeName string `json:"nodeName"`
	// Provider is the underlying storage, lvm, zfs, etc.
	Provider string `json:"provider"`
	// Usage reporting
	FreeCapacity  int64 `json:"freeCapacity"`
	TotalCapacity int64 `json:"totalCapacity"`
}

StoragePoolStatus reports basic information about storage pool state.

func NewStoragePoolStatus

func NewStoragePoolStatus(pool *lapi.StoragePool) *StoragePoolStatus

NewStoragePoolStatus convert from golinstor StoragePool to StoragePoolStatus.

func (*StoragePoolStatus) DeepCopy

func (in *StoragePoolStatus) DeepCopy() *StoragePoolStatus

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

func (*StoragePoolStatus) DeepCopyInto

func (in *StoragePoolStatus) DeepCopyInto(out *StoragePoolStatus)

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

type StoragePoolZFS added in v1.2.0

type StoragePoolZFS struct {
	CommonStoragePoolOptions `json:",inline"`

	// Name of the zpool to use.
	ZPool string `json:"zPool"`

	// use thin provisioning
	Thin bool `json:"thin"`
}

StoragePoolZFS represents

func (*StoragePoolZFS) DeepCopy added in v1.2.0

func (in *StoragePoolZFS) DeepCopy() *StoragePoolZFS

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

func (*StoragePoolZFS) DeepCopyInto added in v1.2.0

func (in *StoragePoolZFS) DeepCopyInto(out *StoragePoolZFS)

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

func (*StoragePoolZFS) ToLinstorStoragePool added in v1.2.0

func (in *StoragePoolZFS) ToLinstorStoragePool() lapi.StoragePool

type StoragePools

type StoragePools struct {
	// LVMPools for LinstorSatelliteSet to manage.
	// +optional
	// +nullable
	LVMPools []*StoragePoolLVM `json:"lvmPools"`

	// LVMThinPools for LinstorSatelliteSet to manage.
	// +optional
	// +nullable
	LVMThinPools []*StoragePoolLVMThin `json:"lvmThinPools"`

	// ZFSPools for LinstorSatelliteSet to manage
	// +optional
	// +nullable
	ZFSPools []*StoragePoolZFS `json:"zfsPools"`
}

StoragePools hold lists of linstor storage pools supported by this operator.

func (*StoragePools) All added in v1.2.0

func (in *StoragePools) All() []StoragePool

func (*StoragePools) AllPhysicalStorageCreators added in v1.2.0

func (in *StoragePools) AllPhysicalStorageCreators() []PhysicalStorageCreator

func (*StoragePools) DeepCopy

func (in *StoragePools) DeepCopy() *StoragePools

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

func (*StoragePools) DeepCopyInto

func (in *StoragePools) DeepCopyInto(out *StoragePools)

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