balancer

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RackLabel      = "failure-domain.beta.kubernetes.io/zone"
	StorageLabel   = "node-role.kubernetes.io/storage"
	PrefNicPropKey = "PrefNic"
)

Variables

This section is empty.

Functions

func GetInternalk8sClient

func GetInternalk8sClient() (clientset kubernetes.Interface, err error)

Types

type BalanceDecision

type BalanceDecision struct {
	StoragePoolName string
	NodeName        string
}

type BalanceScheduler

type BalanceScheduler struct {
	*lc.HighLevelClient
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler(c *lc.HighLevelClient, log *logrus.Entry) (b BalanceScheduler, err error)

func (BalanceScheduler) AccessibleTopologies

func (b BalanceScheduler) AccessibleTopologies(ctx context.Context, volId string, remoteAccessPolicy volume.RemoteAccessPolicy) ([]*csi.Topology, error)

func (BalanceScheduler) Create

func (b BalanceScheduler) Create(ctx context.Context, volId string, params *volume.Parameters, topologies *csi.TopologyRequirement) error

type GetK8sClient

type GetK8sClient func() (kubernetes.Interface, error)

type Node

type Node struct {
	Name          string
	FreeCapacity  int64
	TotalCapacity int64
	PrefNics      map[string]*PrefNic
}

type NodeLinstorClient

type NodeLinstorClient interface {
	GetStoragePools(ctx context.Context, nodeName string, opts ...*lapi.ListOpts) ([]lapi.StoragePool, error)
}

type PrefNic

type PrefNic struct {
	Name          string
	FreeCapacity  int64
	TotalCapacity int64
	StoragePools  []*StoragePool
}

type StoragePool

type StoragePool struct {
	Name          string
	FreeCapacity  int64
	TotalCapacity int64
	PrefNic       string
}

Jump to

Keyboard shortcuts

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