descheduler

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Descheduler

type Descheduler struct {
	// Profiles are the descheduling profiles.
	Profiles profile.Map

	// Close this to shut down the scheduler.
	StopEverything <-chan struct{}
	// contains filtered or unexported fields
}

func New

func New(client clientset.Interface,
	informerFactory informers.SharedInformerFactory,
	dynInformerFactory dynamicinformer.DynamicSharedInformerFactory,
	recorderFactory profile.RecorderFactory,
	stopCh <-chan struct{},
	opts ...Option,
) (*Descheduler, error)

func (*Descheduler) Start

func (d *Descheduler) Start(ctx context.Context) error

type FrameworkCapturer

type FrameworkCapturer func(deschedulerconfig.DeschedulerProfile)

FrameworkCapturer is used for registering a notify function in building framework.

type Option

type Option func(*deschedulerOptions)

Option configures a Scheduler

func WithBuildFrameworkCapturer

func WithBuildFrameworkCapturer(fc FrameworkCapturer) Option

WithBuildFrameworkCapturer sets a notify function for getting buildFramework details.

func WithComponentConfigVersion

func WithComponentConfigVersion(apiVersion string) Option

WithComponentConfigVersion sets the component config version to the DeschedulerConfiguration version used. The string should be the full scheme group/version of the external type we converted from (for example "descheduler/v1alpha2")

func WithDeschedulingInterval

func WithDeschedulingInterval(interval time.Duration) Option

func WithDryRun

func WithDryRun(dryRun bool) Option

func WithEvictionLimiter added in v1.2.0

func WithEvictionLimiter(limiter frameworkruntime.EvictionLimiter) Option

func WithFrameworkOutOfTreeRegistry

func WithFrameworkOutOfTreeRegistry(registry frameworkruntime.Registry) Option

WithFrameworkOutOfTreeRegistry sets the registry for out-of-tree plugins. Those plugins will be appended to the default registry.

func WithKubeConfig

func WithKubeConfig(cfg *restclient.Config) Option

func WithNodeSelector

func WithNodeSelector(nodeSelector *metav1.LabelSelector) Option

func WithPodAssignedToNodeFn

func WithPodAssignedToNodeFn(fn PodAssignedToNodeFn) Option

type PodAssignedToNodeFn

type PodAssignedToNodeFn func(nodeName string) ([]*corev1.Pod, error)

Jump to

Keyboard shortcuts

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