scheduler

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "hwameistor-scheduler-plugin"
)

Name is the name of the plugin used in Registry and configurations.

Variables

This section is empty.

Functions

func New

New initializes a new plugin and returns it.

Types

type LVMVolumeScheduler

type LVMVolumeScheduler struct {
	// contains filtered or unexported fields
}

func (*LVMVolumeScheduler) CSIDriverName

func (s *LVMVolumeScheduler) CSIDriverName() string

func (*LVMVolumeScheduler) Filter

func (s *LVMVolumeScheduler) Filter(lvs []string, pendingPVCs []*corev1.PersistentVolumeClaim, node *corev1.Node) (bool, error)

func (*LVMVolumeScheduler) Reserve added in v0.1.6

func (s *LVMVolumeScheduler) Reserve(pendingPVCs []*corev1.PersistentVolumeClaim, node string) error

func (*LVMVolumeScheduler) Unreserve added in v0.1.6

func (s *LVMVolumeScheduler) Unreserve(pendingPVCs []*corev1.PersistentVolumeClaim, node string) error

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Filter

func (p *Plugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, node *framework.NodeInfo) *framework.Status

Filter is the functions invoked by the framework at "filter" extension point.

func (Plugin) Name

func (p Plugin) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (*Plugin) Reserve added in v0.1.6

func (p *Plugin) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, node string) *framework.Status

Reserve is the functions invoked by the framework at "reserve" extension point.

func (*Plugin) Unreserve added in v0.1.6

func (p *Plugin) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, node string)

Unreserve is the functions invoked by the framework at "reserve" extension point.

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

VolumeScheduler is to scheduler hwameistor volume

func NewScheduler

func NewScheduler(f framework.Handle) *Scheduler

NewDataCache creates a cache instance

func (*Scheduler) Filter

func (s *Scheduler) Filter(pod *corev1.Pod, node *corev1.Node) (bool, error)

func (*Scheduler) Reserve added in v0.1.6

func (s *Scheduler) Reserve(pod *corev1.Pod, node string) error

func (*Scheduler) Unreserve added in v0.1.6

func (s *Scheduler) Unreserve(pod *corev1.Pod, node string) error

type VolumeScheduler

type VolumeScheduler interface {
	Filter(existingLocalVolume []string, unboundPVCs []*v1.PersistentVolumeClaim, node *v1.Node) (bool, error)
	Reserve(unboundPVCs []*v1.PersistentVolumeClaim, node string) error
	Unreserve(unboundPVCs []*v1.PersistentVolumeClaim, node string) error
	CSIDriverName() string
}

func NewDiskVolumeScheduler

func NewDiskVolumeScheduler(f framework.Handle) VolumeScheduler

func NewLVMVolumeScheduler

func NewLVMVolumeScheduler(f framework.Handle, scheduler localstoragev1alpha1.VolumeScheduler, hwameiStorCache cache.Cache, cli client.Client) VolumeScheduler

Jump to

Keyboard shortcuts

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