Documentation ¶
Index ¶
Constants ¶
View Source
const ( AnnotationPassedArbitration = "descheduler.koordinator.sh/passed-arbitration" AnnotationPodArbitrating = "descheduler.koordinator.sh/pod-arbitrating" )
View Source
const (
JobKind = "Job"
)
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(arbitrator Arbitrator, client client.Client) handler.EventHandler
Types ¶
type Arbitrator ¶
type Arbitrator interface { MigrationFilter AddPodMigrationJob(job *v1alpha1.PodMigrationJob) DeletePodMigrationJob(job *v1alpha1.PodMigrationJob) }
func New ¶
func New(args *config.MigrationControllerArgs, options Options) (Arbitrator, error)
New creates an arbitratorImpl based on parameters.
type MigrationFilter ¶
type Options ¶
type Options struct { Client client.Client EventRecorder events.EventRecorder Manager controllerruntime.Manager Handle framework.Handle }
type SortFn ¶
type SortFn func(jobs []*v1alpha1.PodMigrationJob, podOfJob map[*v1alpha1.PodMigrationJob]*corev1.Pod) []*v1alpha1.PodMigrationJob
SortFn stably sorts PodMigrationJobs slice based on a certain strategy. Users can implement different SortFn according to their needs.
func SortJobsByController ¶
func SortJobsByController() SortFn
SortJobsByController returns a SortFn that places PodMigrationJobs in the same job in adjacent positions.
func SortJobsByCreationTime ¶
func SortJobsByCreationTime() SortFn
SortJobsByCreationTime returns a SortFn that stably sorts PodMigrationJobs by create time.
func SortJobsByMigratingNum ¶
SortJobsByMigratingNum returns a SortFn that stably sorts PodMigrationJobs the number of migrating PMJs in the same Job.
func SortJobsByPod ¶
SortJobsByPod sort a SortFn that sorts PodMigrationJobs by their Pods, including priority, QoS.
Click to show internal directories.
Click to hide internal directories.