balancer

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: GPL-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, vol *volume.Info) ([]*csi.Topology, error)

func (BalanceScheduler) Create

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