Documentation ¶
Index ¶
- Variables
- func NewController(kubeClient client.Client, provisioner *Provisioner, recorder events.Recorder) operatorcontroller.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) Create(ctx context.Context, n *scheduler.NodeClaim, ...) (string, error)
- func (p *Provisioner) CreateNodeClaims(ctx context.Context, nodeClaims []*scheduler.NodeClaim, ...) ([]string, error)
- func (p *Provisioner) GetPendingPods(ctx context.Context) ([]*v1.Pod, error)
- func (p *Provisioner) Name() string
- func (p *Provisioner) NewScheduler(ctx context.Context, pods []*v1.Pod, stateNodes []*state.StateNode, ...) (*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.Results, error)
- func (p *Provisioner) Trigger()
- func (p *Provisioner) Validate(ctx context.Context, pod *v1.Pod) error
Constants ¶
This section is empty.
Variables ¶
var ErrNodePoolsNotFound = errors.New("no nodepools found")
Functions ¶
func NewController ¶
func NewController(kubeClient client.Client, provisioner *Provisioner, recorder events.Recorder) operatorcontroller.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) operatorcontroller.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(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) Create ¶
func (p *Provisioner) Create(ctx context.Context, n *scheduler.NodeClaim, opts ...functional.Option[LaunchOptions]) (string, error)
func (*Provisioner) CreateNodeClaims ¶
func (p *Provisioner) CreateNodeClaims(ctx context.Context, nodeClaims []*scheduler.NodeClaim, opts ...functional.Option[LaunchOptions]) ([]string, 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 (*Provisioner) Name ¶
func (p *Provisioner) Name() string
func (*Provisioner) NewScheduler ¶
func (*Provisioner) Trigger ¶
func (p *Provisioner) Trigger()