Documentation ¶
Index ¶
- Constants
- func New(_ runtime.Object, f framework.Handle) (framework.Plugin, error)
- type LVMVolumeScheduler
- func (s *LVMVolumeScheduler) CSIDriverName() string
- func (s *LVMVolumeScheduler) Filter(lvs []string, pendingPVCs []*corev1.PersistentVolumeClaim, node *corev1.Node) (bool, error)
- func (s *LVMVolumeScheduler) Reserve(pendingPVCs []*corev1.PersistentVolumeClaim, node string) error
- func (s *LVMVolumeScheduler) Score(unboundPVCs []*corev1.PersistentVolumeClaim, node string) (int64, error)
- func (s *LVMVolumeScheduler) Unreserve(pendingPVCs []*corev1.PersistentVolumeClaim, node string) error
- type Plugin
- func (p *Plugin) Filter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (p *Plugin) Name() string
- func (p *Plugin) Reserve(_ context.Context, _ *framework.CycleState, pod *v1.Pod, node string) *framework.Status
- func (p *Plugin) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, node string) (int64, *framework.Status)
- func (p *Plugin) ScoreExtensions() framework.ScoreExtensions
- func (p *Plugin) Unreserve(_ context.Context, _ *framework.CycleState, pod *v1.Pod, node string)
- type Scheduler
- type VolumeScheduler
Constants ¶
const MaxHAVolumeCount = 1000
MaxHAVolumeCount
const (
Name = "hwameistor-scheduler-plugin"
)
Name is the name of the plugin used in Registry and configurations.
const VolumeClaim = "PersistentVolumeClaim"
const VolumeSnapshot = "VolumeSnapshot"
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (s *LVMVolumeScheduler) Reserve(pendingPVCs []*corev1.PersistentVolumeClaim, node string) error
func (*LVMVolumeScheduler) Score ¶ added in v0.7.2
func (s *LVMVolumeScheduler) Score(unboundPVCs []*corev1.PersistentVolumeClaim, node string) (int64, error)
Score node according to volume nums and storage pool capacity. For now, we only consider storage capacity, calculate logic is as bellow: volume capacity / poolFreeCapacity less, score higher
func (*LVMVolumeScheduler) Unreserve ¶
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) Reserve ¶
func (p *Plugin) Reserve(_ context.Context, _ *framework.CycleState, pod *v1.Pod, node string) *framework.Status
Reserve is the functions invoked by the framework at "reserve" extension point.
func (*Plugin) Score ¶ added in v0.7.2
func (p *Plugin) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, node string) (int64, *framework.Status)
Score is the functions invoked by framework at "score" extension point
func (*Plugin) ScoreExtensions ¶ added in v0.7.2
func (p *Plugin) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions is the functions invoked by framework at "score extension" extension point
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
VolumeScheduler is to scheduler hwameistor volume
func NewScheduler ¶
NewDataCache creates a cache instance
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 Score(unboundPVCs []*v1.PersistentVolumeClaim, node string) (int64, error) CSIDriverName() string }
func NewDiskVolumeScheduler ¶
func NewDiskVolumeScheduler(f framework.Handle) VolumeScheduler
func NewLVMVolumeScheduler ¶
func NewLVMVolumeScheduler(f framework.Handle, scheduler v1alpha1.VolumeScheduler, hwameiStorCache cache.Cache, cli client.Client) VolumeScheduler