provisioning

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WaitForClusterSync = true

WaitForClusterSync controls whether or not we synchronize before scheduling. This is exposed for unit testing purposes so we can avoid a lengthy delay in cluster sync.

Functions

This section is empty.

Types

type Batcher added in v0.5.4

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

Batcher separates a stream of Trigger() calls into windowed slices. The window is dynamic and will be extended if additional items are added up to a maximum batch duration.

func NewBatcher added in v0.5.4

func NewBatcher(running context.Context, cfg config.Config) *Batcher

NewBatcher is a constructor for the Batcher

func (*Batcher) Trigger added in v0.9.1

func (b *Batcher) Trigger()

Trigger causes the batcher to start a batching window, or extend the current batching window if it hasn't reached the maximum length.

func (*Batcher) TriggerImmediate added in v0.9.1

func (b *Batcher) TriggerImmediate()

TriggerImmediate causes the batcher to immediately end the current batching window and causes the waiter on the batching window to continue.

func (*Batcher) Wait added in v0.5.4

func (b *Batcher) Wait() (window time.Duration)

Wait starts a batching window and returns a slice of items when closed.

type Controller

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

Controller for the resource

func NewController

func NewController(kubeClient client.Client, provisioner *Provisioner, recorder events.Recorder) *Controller

NewController constructs a controller instance

func (*Controller) LivenessProbe added in v0.16.1

func (c *Controller) LivenessProbe(req *http.Request) error

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile the resource

func (*Controller) Recorder added in v0.10.0

func (c *Controller) Recorder() events.Recorder

func (*Controller) Register

func (c *Controller) Register(_ context.Context, m manager.Manager) error

func (*Controller) TriggerAndWait deprecated added in v0.9.1

func (c *Controller) TriggerAndWait()

Deprecated: TriggerAndWait is used for unit testing purposes only

type LaunchOptions added in v0.15.0

type LaunchOptions struct {
	// RecordPodNomination causes nominate pod events to be recorded against the node.
	RecordPodNomination bool
}

type Provisioner

type Provisioner struct {
	// State
	Stop context.CancelFunc
	// contains filtered or unexported fields
}

Provisioner waits for enqueued pods, batches them, creates capacity and binds the pods to the capacity.

func NewProvisioner added in v0.5.2

func NewProvisioner(ctx context.Context, cfg config.Config, kubeClient client.Client, coreV1Client corev1.CoreV1Interface, recorder events.Recorder, cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster) *Provisioner

func (*Provisioner) LaunchNodes added in v0.15.0

func (p *Provisioner) LaunchNodes(ctx context.Context, opts LaunchOptions, nodes ...*scheduler.Node) ([]string, error)

LaunchNodes launches nodes passed into the function in parallel. It returns a slice of the successfully created node names as well as a multierr of any errors that occurred while launching nodes

func (*Provisioner) LivenessProbe added in v0.16.1

func (p *Provisioner) LivenessProbe(req *http.Request) error

func (*Provisioner) NewScheduler added in v0.15.0

func (p *Provisioner) NewScheduler(ctx context.Context, pods []*v1.Pod, stateNodes []*state.Node, opts scheduler.SchedulerOptions) (*scheduler.Scheduler, error)

nolint: gocyclo

func (*Provisioner) Provision added in v0.11.0

func (p *Provisioner) Provision(ctx context.Context) error

func (*Provisioner) Start

func (p *Provisioner) Start(ctx context.Context)

func (*Provisioner) Trigger added in v0.9.1

func (p *Provisioner) Trigger()

func (*Provisioner) TriggerAndWait deprecated added in v0.9.1

func (p *Provisioner) TriggerAndWait()

Deprecated: TriggerAndWait is used for unit testing purposes only

func (*Provisioner) Validate added in v0.11.0

func (p *Provisioner) Validate(ctx context.Context, pod *v1.Pod) error

type VolumeTopology added in v0.9.1

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

func NewVolumeTopology added in v0.9.1

func NewVolumeTopology(kubeClient client.Client) *VolumeTopology

func (*VolumeTopology) Inject added in v0.9.1

func (v *VolumeTopology) Inject(ctx context.Context, pod *v1.Pod) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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