Documentation
¶
Index ¶
- func NewController(kubeClient client.Client, provisioner *Provisioner, recorder events.Recorder) corecontroller.Controller
- func WithReason(reason string) func(LaunchOptions) LaunchOptions
- type Batcher
- type Controller
- type LaunchOptions
- type Provisioner
- func (p *Provisioner) Builder(_ context.Context, mgr manager.Manager) controller.Builder
- func (p *Provisioner) GetPendingPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *Provisioner) Launch(ctx context.Context, machine *scheduler.Machine, ...) (string, error)
- func (p *Provisioner) LaunchMachines(ctx context.Context, machines []*scheduler.Machine, ...) ([]string, error)
- func (p *Provisioner) Name() string
- func (p *Provisioner) NewScheduler(ctx context.Context, pods []*v1.Pod, stateNodes []*state.Node, ...) (*scheduler.Scheduler, error)
- func (p *Provisioner) Reconcile(ctx context.Context, _ reconcile.Request) (result reconcile.Result, err error)
- func (p *Provisioner) Schedule(ctx context.Context) ([]*scheduler.Machine, []*scheduler.ExistingNode, error)
- func (p *Provisioner) Trigger()
- func (p *Provisioner) Validate(ctx context.Context, pod *v1.Pod) error
- type VolumeTopology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(kubeClient client.Client, provisioner *Provisioner, recorder events.Recorder) corecontroller.Controller
NewController constructs a controller instance
func WithReason ¶
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.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller for the resource
func (*Controller) Builder ¶
func (c *Controller) Builder(_ context.Context, m manager.Manager) corecontroller.Builder
func (*Controller) Name ¶
func (c *Controller) Name() string
type LaunchOptions ¶
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(ctx context.Context, kubeClient client.Client, coreV1Client corev1.CoreV1Interface, recorder events.Recorder, cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster) *Provisioner
func (*Provisioner) Builder ¶
func (p *Provisioner) Builder(_ context.Context, mgr manager.Manager) controller.Builder
func (*Provisioner) GetPendingPods ¶
func (*Provisioner) Launch ¶
func (p *Provisioner) Launch(ctx context.Context, machine *scheduler.Machine, opts ...functional.Option[LaunchOptions]) (string, error)
func (*Provisioner) LaunchMachines ¶
func (p *Provisioner) LaunchMachines(ctx context.Context, machines []*scheduler.Machine, opts ...functional.Option[LaunchOptions]) ([]string, error)
LaunchMachines 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) Name ¶
func (p *Provisioner) Name() string
func (*Provisioner) NewScheduler ¶
func (*Provisioner) Schedule ¶
func (p *Provisioner) Schedule(ctx context.Context) ([]*scheduler.Machine, []*scheduler.ExistingNode, error)
func (*Provisioner) Trigger ¶
func (p *Provisioner) Trigger()
type VolumeTopology ¶
type VolumeTopology struct {
// contains filtered or unexported fields
}
func NewVolumeTopology ¶
func NewVolumeTopology(kubeClient client.Client) *VolumeTopology