Documentation ¶
Index ¶
- Variables
- func RecordPodNomination(o *LaunchOptions)
- func WithReason(reason string) func(*LaunchOptions)
- type Batcher
- type LaunchOptions
- type NodeController
- type PodController
- type Provisioner
- 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) ([]*corev1.Pod, error)
- func (p *Provisioner) NewScheduler(ctx context.Context, pods []*corev1.Pod, stateNodes []*state.StateNode) (*scheduler.Scheduler, error)
- func (p *Provisioner) Reconcile(ctx context.Context) (result reconcile.Result, err error)
- func (p *Provisioner) Register(_ context.Context, m manager.Manager) error
- func (p *Provisioner) Schedule(ctx context.Context) (scheduler.Results, error)
- func (p *Provisioner) Trigger()
- func (p *Provisioner) Validate(ctx context.Context, pod *corev1.Pod) error
Constants ¶
This section is empty.
Variables ¶
var ErrNodePoolsNotFound = errors.New("no nodepools found")
Functions ¶
func RecordPodNomination ¶
func RecordPodNomination(o *LaunchOptions)
RecordPodNomination causes nominate pod events to be recorded against the node.
func WithReason ¶
func WithReason(reason string) func(*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 LaunchOptions ¶
LaunchOptions are the set of options that can be used to trigger certain actions and configuration during scheduling
type NodeController ¶ added in v0.34.0
type NodeController struct {
// contains filtered or unexported fields
}
NodeController for the resource
func NewNodeController ¶ added in v0.34.0
func NewNodeController(kubeClient client.Client, provisioner *Provisioner) *NodeController
NewNodeController constructs a controller instance
type PodController ¶ added in v0.34.0
type PodController struct {
// contains filtered or unexported fields
}
PodController for the resource
func NewPodController ¶ added in v0.34.0
func NewPodController(kubeClient client.Client, provisioner *Provisioner) *PodController
NewPodController constructs a controller instance
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, clock clock.Clock, ) *Provisioner
func (*Provisioner) Create ¶
func (p *Provisioner) Create(ctx context.Context, n *scheduler.NodeClaim, opts ...option.Function[LaunchOptions]) (string, error)
func (*Provisioner) CreateNodeClaims ¶
func (p *Provisioner) CreateNodeClaims(ctx context.Context, nodeClaims []*scheduler.NodeClaim, opts ...option.Function[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) NewScheduler ¶
func (*Provisioner) Trigger ¶
func (p *Provisioner) Trigger()