provisioning

package
v0.32.9 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodePoolsNotFound = errors.New("no nodepools or provisioners found")

Functions

func NewController

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

NewController constructs a controller instance

func WithReason added in v0.26.0

func WithReason(reason string) func(LaunchOptions) LaunchOptions

Types

type Batcher

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

func NewBatcher() *Batcher

NewBatcher is a constructor for the Batcher

func (*Batcher) Trigger

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) Wait

func (b *Batcher) Wait(ctx context.Context) bool

Wait starts a batching window and continues waiting as long as it continues receiving triggers within the idleDuration, up to the maxDuration

type Controller

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

Controller for the resource

func (*Controller) Builder

func (*Controller) Name

func (c *Controller) Name() string

func (*Controller) Reconcile

func (c *Controller) Reconcile(_ context.Context, p *v1.Pod) (reconcile.Result, error)

Reconcile the resource

type LaunchOptions

type LaunchOptions struct {
	RecordPodNomination bool
	Reason              string
}

LaunchOptions are the set of options that can be used to trigger certain actions and configuration during scheduling

func RecordPodNomination

func RecordPodNomination(o LaunchOptions) LaunchOptions

RecordPodNomination causes nominate pod events to be recorded against the node.

type Provisioner

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

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

func NewProvisioner

func NewProvisioner(kubeClient client.Client, recorder events.Recorder,
	cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster,
) *Provisioner

func (*Provisioner) Builder

func (*Provisioner) CreateNodeClaims added in v0.30.0

func (p *Provisioner) CreateNodeClaims(ctx context.Context, nodeClaims []*scheduler.NodeClaim, opts ...functional.Option[LaunchOptions]) ([]nodeclaimutil.Key, error)

CreateNodeClaims 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) GetPendingPods

func (p *Provisioner) GetPendingPods(ctx context.Context) ([]*v1.Pod, error)

func (*Provisioner) Launch added in v0.24.0

func (*Provisioner) Name

func (p *Provisioner) Name() string

func (*Provisioner) NewScheduler

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

func (*Provisioner) Reconcile

func (p *Provisioner) Reconcile(ctx context.Context, _ reconcile.Request) (result reconcile.Result, err error)

func (*Provisioner) Schedule added in v0.24.0

func (p *Provisioner) Schedule(ctx context.Context) (*scheduler.Results, error)

func (*Provisioner) Trigger

func (p *Provisioner) Trigger()

func (*Provisioner) Validate

func (p *Provisioner) Validate(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