descheduler

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 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 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)

Directories

Path Synopsis
apis
config/v1alpha2
Package v1alpha2 is the v1alpha2 version of the descheduler API
Package v1alpha2 is the v1alpha2 version of the descheduler API

Jump to

Keyboard shortcuts

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