provisioning

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxBatchDuration  = time.Second * 10
	BatchIdleDuration = time.Second * 1
)

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) *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(ctx context.Context, kubeClient client.Client, coreV1Client corev1.CoreV1Interface, cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster) *Controller

NewController constructs a controller instance

func (*Controller) Reconcile

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

Reconcile the resource

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 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, kubeClient client.Client, coreV1Client corev1.CoreV1Interface, cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster) *Provisioner

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

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