shared

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 3 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"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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.pem`: root certificate used to validate HTTPS connections with Linstor (PEM format, without password)
	// (b) `client.key`: client key used by the linstor client (PEM format, without password)
	// (c) `client.cert`: 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 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 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 {
	ToLinstorStoragePool() lapi.StoragePool
}

StoragePool is the generalized type of storage pools.

type StoragePoolLVM

type StoragePoolLVM struct {
	// Name of the storage pool.
	Name string `json:"name"`
	// Name of underlying lvm group
	VolumeGroup string `json:"volumeGroup"`
}

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 (s *StoragePoolLVM) ToLinstorStoragePool() lapi.StoragePool

ToLinstorStoragePool returns lapi.StoragePool presentation of the StoragePoolLVM

type StoragePoolLVMThin

type StoragePoolLVMThin struct {
	StoragePoolLVM `json:",inline"`
	// Name of underlying lvm thin volume
	ThinVolume string `json:"thinVolume"`
}

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

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 (s *StoragePoolLVMThin) ToLinstorStoragePool() lapi.StoragePool

ToLinstorStoragePool returns lapi.StoragePool presentation of the StoragePoolLVMThin

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 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"`
}

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

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