Documentation
¶
Index ¶
- Variables
- type Batcher
- type Controller
- func (c *Controller) LivenessProbe(req *http.Request) error
- func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
- func (c *Controller) Recorder() events.Recorder
- func (c *Controller) Register(_ context.Context, m manager.Manager) error
- func (c *Controller) TriggerAndWait()deprecated
- type LaunchOptions
- type Provisioner
- func (p *Provisioner) LaunchNodes(ctx context.Context, opts LaunchOptions, nodes ...*scheduler.Node) ([]string, error)
- func (p *Provisioner) LivenessProbe(req *http.Request) error
- func (p *Provisioner) NewScheduler(ctx context.Context, pods []*v1.Pod, stateNodes []*state.Node, ...) (*scheduler.Scheduler, error)
- func (p *Provisioner) Provision(ctx context.Context) error
- func (p *Provisioner) Start(ctx context.Context)
- func (p *Provisioner) Trigger()
- func (p *Provisioner) TriggerAndWait()deprecated
- func (p *Provisioner) Validate(ctx context.Context, pod *v1.Pod) error
- type VolumeTopology
Constants ¶
This section is empty.
Variables ¶
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
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.
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) 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
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