Documentation ¶
Index ¶
- Constants
- func NewEnginesNodeRanker() *featureNodeRanker
- func NewFixedRanker(ranks ...int) *fixedRanker
- func NewPublishersNodeRanker() *featureNodeRanker
- func NewStoragesNodeRanker() *featureNodeRanker
- type AvailableCapacityNodeRanker
- type Chain
- type LabelsNodeRanker
- type MaxUsageNodeRanker
- type MinVersionNodeRanker
- type MinVersionNodeRankerParams
- type PreviousExecutionsNodeRanker
- type PreviousExecutionsNodeRankerParams
- type RandomNodeRanker
- type RandomNodeRankerParams
Constants ¶
const FavourNodeSelectorPrefix = "favour_"
FavourNodeSelectorPrefix labels prefixed with this string will be considered as a "favour" selector that prioritizes those nodes, instead of a "must" selector that filters out nodes that don't match.
Variables ¶
This section is empty.
Functions ¶
func NewEnginesNodeRanker ¶
func NewEnginesNodeRanker() *featureNodeRanker
func NewFixedRanker ¶
func NewFixedRanker(ranks ...int) *fixedRanker
func NewPublishersNodeRanker ¶
func NewPublishersNodeRanker() *featureNodeRanker
func NewStoragesNodeRanker ¶
func NewStoragesNodeRanker() *featureNodeRanker
Types ¶
type AvailableCapacityNodeRanker ¶ added in v1.3.1
type AvailableCapacityNodeRanker struct{}
AvailableCapacityNodeRanker ranks nodes based on their available capacity and queue used capacity.
func NewAvailableCapacityNodeRanker ¶ added in v1.3.1
func NewAvailableCapacityNodeRanker() *AvailableCapacityNodeRanker
NewAvailableCapacityNodeRanker creates a new instance of AvailableCapacityNodeRanker.
func (*AvailableCapacityNodeRanker) RankNodes ¶ added in v1.3.1
func (s *AvailableCapacityNodeRanker) RankNodes( ctx context.Context, job models.Job, nodes []models.NodeInfo) ([]orchestrator.NodeRank, error)
RankNodes ranks nodes based on their available capacity and queue used capacity. Nodes with more available capacity are ranked higher, and nodes with more queue capacity are ranked lower.
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain assigns a random rank to each node to allow the orchestrator to select random top nodes for job execution.
type LabelsNodeRanker ¶
type LabelsNodeRanker struct { }
func NewLabelsNodeRanker ¶
func NewLabelsNodeRanker() *LabelsNodeRanker
func (*LabelsNodeRanker) RankNodes ¶
func (s *LabelsNodeRanker) RankNodes(ctx context.Context, job models.Job, nodes []models.NodeInfo) ([]orchestrator.NodeRank, error)
RankNodes ranks nodes based on the node labels and job selectors: - Rank 20: Selectors with `favour_` prefix and matching node labels - Rank 10: Selectors match node labels. - Rank -1: Selectors don't match node labels. - Rank 0: Job selectors are not set.
type MaxUsageNodeRanker ¶
type MaxUsageNodeRanker struct { }
func NewMaxUsageNodeRanker ¶
func NewMaxUsageNodeRanker() *MaxUsageNodeRanker
func (*MaxUsageNodeRanker) RankNodes ¶
func (s *MaxUsageNodeRanker) RankNodes(ctx context.Context, job models.Job, nodes []models.NodeInfo) ([]orchestrator.NodeRank, error)
RankNodes ranks nodes based on the MaxJobRequirements the compute nodes are accepting: - Rank 10: Node is accepting MaxJobRequirements that are equal or higher than the job requirements. - Rank -1: Node is accepting MaxJobRequirements that are lower than the job requirements. - Rank 0: Node MaxJobRequirements are not set, or the node was discovered not through nodeInfoPublisher (e.g. identity protocol)
type MinVersionNodeRanker ¶
type MinVersionNodeRanker struct {
// contains filtered or unexported fields
}
func NewMinVersionNodeRanker ¶
func NewMinVersionNodeRanker(params MinVersionNodeRankerParams) *MinVersionNodeRanker
type MinVersionNodeRankerParams ¶
type MinVersionNodeRankerParams struct {
MinVersion models.BuildVersionInfo
}
type PreviousExecutionsNodeRanker ¶
type PreviousExecutionsNodeRanker struct {
// contains filtered or unexported fields
}
func NewPreviousExecutionsNodeRanker ¶
func NewPreviousExecutionsNodeRanker(params PreviousExecutionsNodeRankerParams) *PreviousExecutionsNodeRanker
func (*PreviousExecutionsNodeRanker) RankNodes ¶
func (s *PreviousExecutionsNodeRanker) RankNodes(ctx context.Context, job models.Job, nodes []models.NodeInfo) ([]orchestrator.NodeRank, error)
RankNodes ranks nodes based on whether the node has already executed the job, which is useful when ranking nodes when handling retries: - Rank 30: Node has never executed the job. - Rank 0: Node has already executed the job. - Rank -1: Node has executed the job more than once or has rejected a bid
type RandomNodeRanker ¶
type RandomNodeRanker struct {
// contains filtered or unexported fields
}
RandomNodeRanker assigns a random rank to each node to allow the orchestrator to select random top nodes for job execution.
func NewRandomNodeRanker ¶
func NewRandomNodeRanker(params RandomNodeRankerParams) *RandomNodeRanker
type RandomNodeRankerParams ¶
type RandomNodeRankerParams struct {
RandomnessRange int
}