kubesim

package
v0.0.0-...-57dc925 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(path string) (*config.Config, error)

ReadConfig reads and parses a config from the path (excluding file extension).

Types

type KubeSim

type KubeSim struct {
	Clock clock.Clock

	MigrationClient *migration.Client
	// contains filtered or unexported fields
}

KubeSim represents a simulated kubernetes cluster.

func NewKubeSim

func NewKubeSim(
	conf *config.Config, queue queue.PodQueue, sched scheduler.Scheduler, metricClient *migration.Client) (*KubeSim, error)

NewKubeSim creates a new KubeSim with the given config, queue, and scheduler. Returns error if the configuration failed.

func (*KubeSim) AddSubmitter

func (k *KubeSim) AddSubmitter(name string, submitter submitter.Submitter)

AddSubmitter adds the new submitter to this KubeSim.

func (*KubeSim) List

func (k *KubeSim) List() ([]*v1.Node, error)

List implements "k8s.io/pkg/scheduler/algorithm".NodeLister interface. Never returns an error.

func (*KubeSim) Run

func (k *KubeSim) Run(ctx context.Context) error

Run executes the main loop, which invokes submitters and the scheduler, and binds pods to the selected nodes. This method blocks until ctx is done or this KubeSim finishes processing all pods.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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