Documentation
¶
Index ¶
- Constants
- func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)
- type Plugin
- func (pl *Plugin) AfterPreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, ...) error
- func (pl *Plugin) BeforeFilter(handle frameworkext.ExtendedHandle, cycleState *framework.CycleState, ...) (*corev1.Pod, *framework.NodeInfo, bool)
- func (pl *Plugin) BeforePreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, ...) (*corev1.Pod, bool)
- func (pl *Plugin) Bind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) Filter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) FilterReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) Name() string
- func (pl *Plugin) NewControllers() ([]frameworkext.Controller, error)
- func (pl *Plugin) NominateReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) (*schedulingv1alpha1.Reservation, *framework.Status)
- func (pl *Plugin) NormalizeScore(ctx context.Context, state *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) PostFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) (*framework.PostFilterResult, *framework.Status)
- func (pl *Plugin) PreBind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
- func (pl *Plugin) PreFilterExtensions() framework.PreFilterExtensions
- func (pl *Plugin) PreScore(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) Reserve(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) Score(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) (int64, *framework.Status)
- func (pl *Plugin) ScoreExtensions() framework.ScoreExtensions
- func (pl *Plugin) ScoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) (int64, *framework.Status)
- func (pl *Plugin) Unreserve(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...)
Constants ¶
View Source
const ( Name = "Reservation" // ErrReasonNodeNotMatchReservation is the reason for node not matching which the reserve pod specifies. ErrReasonNodeNotMatchReservation = "node(s) didn't match the nodeName specified by reservation" // ErrReasonOnlyOneSameReusableReservationOnSameNode is the reason for only one same reusable reservation can be scheduled on a same node ErrReasonOnlyOneSameReusableReservationOnSameNode = "node(s) only one same reusable reservation can be scheduled on a same node" // ErrReasonReservationInactive is the reason for the reservation is failed/succeeded and should not be used. ErrReasonReservationInactive = "reservation is not active" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) AfterPreFilter ¶ added in v1.2.0
func (pl *Plugin) AfterPreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod) error
func (*Plugin) BeforeFilter ¶ added in v1.2.0
func (pl *Plugin) BeforeFilter(handle frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod, nodeInfo *framework.NodeInfo) (*corev1.Pod, *framework.NodeInfo, bool)
func (*Plugin) BeforePreFilter ¶ added in v1.2.0
func (pl *Plugin) BeforePreFilter(_ frameworkext.ExtendedHandle, cycleState *framework.CycleState, pod *corev1.Pod) (*corev1.Pod, bool)
func (*Plugin) Bind ¶
func (pl *Plugin) Bind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status
Bind fake binds reserve pod and mark corresponding reservation as Available. NOTE: This Bind plugin should get called before DefaultBinder; plugin order should be configured.
func (*Plugin) Filter ¶
func (pl *Plugin) Filter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeInfo *framework.NodeInfo) *framework.Status
Filter only processes pods either the pod is a reserve pod or a pod can allocate reserved resources on the node.
func (*Plugin) FilterReservation ¶ added in v1.2.0
func (pl *Plugin) FilterReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservation *schedulingv1alpha1.Reservation, nodeName string) *framework.Status
func (*Plugin) NewControllers ¶ added in v1.2.0
func (pl *Plugin) NewControllers() ([]frameworkext.Controller, error)
func (*Plugin) NominateReservation ¶ added in v1.2.0
func (pl *Plugin) NominateReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, nodeName string) (*schedulingv1alpha1.Reservation, *framework.Status)
func (*Plugin) NormalizeScore ¶ added in v0.7.0
func (*Plugin) PostFilter ¶
func (pl *Plugin) PostFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, _ framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status)
func (*Plugin) PreFilter ¶
func (pl *Plugin) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
PreFilter checks if the pod is a reserve pod. If it is, update cycle state to annotate reservation scheduling. Also do validations in this phase.
func (*Plugin) PreFilterExtensions ¶
func (pl *Plugin) PreFilterExtensions() framework.PreFilterExtensions
func (*Plugin) ScoreExtensions ¶
func (pl *Plugin) ScoreExtensions() framework.ScoreExtensions
func (*Plugin) ScoreReservation ¶ added in v1.2.0
func (pl *Plugin) ScoreReservation(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, reservation *schedulingv1alpha1.Reservation, nodeName string) (int64, *framework.Status)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.