scheduling

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoredForTopology added in v0.5.3

func IgnoredForTopology(p *v1.Pod) bool

func TopologyListOptions added in v0.5.3

func TopologyListOptions(namespace string, constraint *v1.TopologySpreadConstraint) *client.ListOptions

Types

type Node added in v0.7.1

type Node struct {
	Constraints         *v1alpha5.Constraints
	InstanceTypeOptions []cloudprovider.InstanceType
	Pods                []*v1.Pod
}

Node is a set of constraints, compatible pods, and possible instance types that could fulfill these constraints. This will be turned into one or more actual node instances within the cluster after bin packing.

func NewNode added in v0.7.1

func NewNode(constraints *v1alpha5.Constraints, instanceTypeOptions []cloudprovider.InstanceType, pods ...*v1.Pod) *Node

func (*Node) Add added in v0.7.1

func (n *Node) Add(pod *v1.Pod)

func (Node) Compatible added in v0.7.1

func (n Node) Compatible(pod *v1.Pod) error

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

func NewScheduler

func NewScheduler(kubeClient client.Client) *Scheduler

func (*Scheduler) Solve

func (s *Scheduler) Solve(ctx context.Context, provisioner *v1alpha5.Provisioner, instanceTypes []cloudprovider.InstanceType, pods []*v1.Pod) ([]*Node, error)

type Topology

type Topology struct {
	// contains filtered or unexported fields
}

func (*Topology) Inject

func (t *Topology) Inject(ctx context.Context, constraints *v1alpha5.Constraints, pods []*v1.Pod) error

Inject injects topology rules into pods using supported NodeSelectors

type TopologyGroup

type TopologyGroup struct {
	Constraint v1.TopologySpreadConstraint
	Pods       []*v1.Pod
	// contains filtered or unexported fields
}

TopologyGroup is a set of pods that share a topology spread constraint

func NewTopologyGroup

func NewTopologyGroup(pod *v1.Pod, constraint v1.TopologySpreadConstraint) *TopologyGroup

func (*TopologyGroup) Increment

func (t *TopologyGroup) Increment(domain string)

Increment increments the spread of a registered domain

func (*TopologyGroup) NextDomain

func (t *TopologyGroup) NextDomain(requirement sets.String) string

NextDomain chooses a domain within the constraints that minimizes skew

func (*TopologyGroup) Register

func (t *TopologyGroup) Register(domains ...string)

Jump to

Keyboard shortcuts

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