Documentation
¶
Overview ¶
Package placement is the multi-node scheduler: node label selectors plus a simple spread over eligible nodes. No bin-packing, by design.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoEligibleNode = errors.New("placement: no eligible node")
ErrNoEligibleNode is returned when no candidate passes every filter.
Functions ¶
func ParseLabels ¶
ParseLabels turns ["k=v", ...] into a validated map.
func ValidateLabels ¶
ValidateLabels checks keys and values are short, plain identifiers.
Types ¶
type Candidate ¶
type Candidate struct {
ID string
Name string
Labels map[string]string
Schedulable bool
Online bool
// Load is how many apps and databases already run there.
Load int
}
Candidate is one node as the scheduler sees it.
type Request ¶
type Request struct {
Selector Selector
// Exclude is skipped outright, typically the node being drained.
Exclude string
}
Request is what one placement decision needs.
Click to show internal directories.
Click to hide internal directories.