topology

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LinstorNodeKey refers to a node running the LINSTOR csi node service
	// and the linstor Satellite and is therefore capable of hosting LINSTOR volumes.
	LinstorNodeKey = "linbit.com/hostname"

	// LinstorStoragePoolKeyPrefix is the prefix used when specifying the available storage
	// pools on a node via CSI topology keys.
	LinstorStoragePoolKeyPrefix = "linbit.com/sp-"

	// LinstorStoragePoolValue is the value assigned to the storage pool label, given that the node has access to the
	// storage pool.
	LinstorStoragePoolValue = "true"
)

Variables

This section is empty.

Functions

func ToStoragePoolLabel added in v0.10.0

func ToStoragePoolLabel(storagePoolName string) string

ToStoragePoolLabel converts the storage pool name into a CSI Topology compatible label.

There is an upper limit on the length of these keys (63 chars for prefix + 63 chars for the key) as per CSI Spec. LINSTOR enforces a stricter limit of 48 characters for storage pools, so this should not be an issue.

Types

type PlacementPolicy

type PlacementPolicy int

PlacementPolicy determines which scheduler will create volumes and report their accessible topology.

const (
	// Unknown placement policy
	Unknown PlacementPolicy = iota
	// Manual place volumes with a list of nodes and clients.
	Manual
	// AutoPlace volumes using linstor's built in autoplace feature.
	AutoPlace
	// FollowTopology place volumes local to topology preferences, in order
	// of those preferences.
	FollowTopology
	// Balanced places remote volumes in the same zone(Rack)
	// and pick Node, StoragePool, PrefNic based on utilization
	Balanced
	// AutoPlaceTopology places volumes based on topology parameters and LINSTOR
	// autoplace selection in the storage class.
	AutoPlaceTopology
)

func PlacementPolicyString

func PlacementPolicyString(s string) (PlacementPolicy, error)

PlacementPolicyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func PlacementPolicyValues

func PlacementPolicyValues() []PlacementPolicy

PlacementPolicyValues returns all values of the enum

func (PlacementPolicy) IsAPlacementPolicy

func (i PlacementPolicy) IsAPlacementPolicy() bool

IsAPlacementPolicy returns "true" if the value is listed in the enum definition. "false" otherwise

func (PlacementPolicy) String

func (i PlacementPolicy) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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