scheduling

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 21 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 Schedule

type Schedule struct {
	*v1alpha5.Constraints
	// Pods is a set of pods that may schedule to the node; used for binpacking.
	Pods []*v1.Pod
}

type Scheduler

type Scheduler struct {
	KubeClient client.Client
	Topology   *Topology
}

func NewScheduler

func NewScheduler(kubeClient client.Client) *Scheduler

func (*Scheduler) Solve

func (s *Scheduler) Solve(ctx context.Context, provisioner *v1alpha5.Provisioner, pods []*v1.Pod) (schedules []*Schedule, err 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