Documentation
¶
Index ¶
- func NewPipeline(steps []v1alpha1.Step, db db.DB, monitor lib.PipelineMonitor) (lib.Pipeline[ironcore.MachinePipelineRequest], error)
- type DecisionPipelineController
- func (c *DecisionPipelineController) InitPipeline(steps []v1alpha1.Step) (lib.Pipeline[ironcore.MachinePipelineRequest], error)
- func (c *DecisionPipelineController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (c *DecisionPipelineController) SetupWithManager(mgr manager.Manager) error
- type MachineStep
- type NoopFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPipeline ¶
func NewPipeline( steps []v1alpha1.Step, db db.DB, monitor lib.PipelineMonitor, ) (lib.Pipeline[ironcore.MachinePipelineRequest], error)
Create a new machine scheduler pipeline.
Types ¶
type DecisionPipelineController ¶
type DecisionPipelineController struct {
// Toolbox shared between all pipeline controllers.
lib.BasePipelineController[lib.Pipeline[ironcore.MachinePipelineRequest]]
// Config for the scheduling operator.
Conf conf.Config
// Database to pass down to all steps.
DB db.DB
// Monitor to pass down to all pipelines.
Monitor lib.PipelineMonitor
}
The decision pipeline controller takes decision resources containing a machine ref and runs the scheduling pipeline to make a decision. This decision is then written back to the decision resource status.
Additionally, the controller watches for pipeline and step changes to reconfigure the pipelines as needed.
func (*DecisionPipelineController) InitPipeline ¶
func (c *DecisionPipelineController) InitPipeline(steps []v1alpha1.Step) (lib.Pipeline[ironcore.MachinePipelineRequest], error)
The base controller will delegate the pipeline creation down to this method.
func (*DecisionPipelineController) SetupWithManager ¶
func (c *DecisionPipelineController) SetupWithManager(mgr manager.Manager) error
type MachineStep ¶
type MachineStep = lib.Step[ironcore.MachinePipelineRequest]
type NoopFilter ¶
type NoopFilter struct {
Alias string
}
Just a filter that does nothing and lets all candidates through.
func (NoopFilter) GetName ¶
func (NoopFilter) GetName() string
Get the name of this step. The name is used to identify the step in metrics, config, logs, and more. Should be something like: "my_cool_scheduler_step".
func (NoopFilter) Run ¶
func (NoopFilter) Run(traceLog *slog.Logger, request v1alpha1.MachinePipelineRequest) (*lib.StepResult, error)
Run this step of the scheduling pipeline. Return a map of keys to activation values. Important: keys that are not in the map are considered as filtered out. Provide a traceLog that contains the global request id and should be used to log the step's execution.