schedulerinterface

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2025 License: Apache-2.0, BSD-2-Clause, MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPluginName

func GetDefaultPluginName() string

Types

type BatchScheduler

type BatchScheduler interface {
	// Name corresponds to the schedulerName in Kubernetes:
	// https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/
	Name() string

	// DoBatchSchedulingOnSubmission handles submitting the RayCluster/RayJob to the batch scheduler on creation / update
	// For most batch schedulers, this results in the creation of a PodGroup.
	DoBatchSchedulingOnSubmission(ctx context.Context, object metav1.Object) error

	// AddMetadataToChildResource enriches the child resource (batchv1.Job, rayv1.RayCluster) with metadata necessary to tie it to the scheduler.
	// For example, setting labels for queues / priority, and setting schedulerName.
	AddMetadataToChildResource(ctx context.Context, parent metav1.Object, child metav1.Object, groupName string)
}

BatchScheduler manages submitting RayCluster pods to a third-party scheduler.

type BatchSchedulerFactory

type BatchSchedulerFactory interface {
	// New creates a new BatchScheduler for the scheduler plugin.
	New(ctx context.Context, config *rest.Config, cli client.Client) (BatchScheduler, error)

	// AddToScheme adds the types in this scheduler to the given scheme (runs during init).
	AddToScheme(scheme *runtime.Scheme)

	// ConfigureReconciler configures the RayCluster Reconciler in the process of being built by
	// adding watches for its scheduler-specific custom resource types, and any other needed setup.
	ConfigureReconciler(b *builder.Builder) *builder.Builder
}

BatchSchedulerFactory handles initial setup of the scheduler plugin by registering the necessary callbacks with the operator, and the creation of the BatchScheduler itself.

type DefaultBatchScheduler

type DefaultBatchScheduler struct{}

func (*DefaultBatchScheduler) AddMetadataToChildResource added in v1.5.0

func (d *DefaultBatchScheduler) AddMetadataToChildResource(_ context.Context, _ metav1.Object, _ metav1.Object, _ string)

func (*DefaultBatchScheduler) DoBatchSchedulingOnSubmission

func (d *DefaultBatchScheduler) DoBatchSchedulingOnSubmission(_ context.Context, _ metav1.Object) error

func (*DefaultBatchScheduler) Name

func (d *DefaultBatchScheduler) Name() string

type DefaultBatchSchedulerFactory

type DefaultBatchSchedulerFactory struct{}

func (*DefaultBatchSchedulerFactory) AddToScheme

func (df *DefaultBatchSchedulerFactory) AddToScheme(_ *runtime.Scheme)

func (*DefaultBatchSchedulerFactory) ConfigureReconciler

func (df *DefaultBatchSchedulerFactory) ConfigureReconciler(b *builder.Builder) *builder.Builder

func (*DefaultBatchSchedulerFactory) New

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL