Documentation ¶
Index ¶
- Constants
- func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)
- func SetReservationCache(cache ReservationCache)
- type NodeReservations
- type Plugin
- func (pl *Plugin) AddNominatedReservation(pod *corev1.Pod, nodeName string, rInfo *frameworkext.ReservationInfo)
- func (pl *Plugin) AddNominatedReservePod(pod *corev1.Pod, nodeName string)
- func (pl *Plugin) AddPod(ctx context.Context, cycleState *framework.CycleState, ...) *framework.Status
- func (pl *Plugin) AfterPreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) *framework.Status
- func (pl *Plugin) BeforeFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) (*corev1.Pod, *framework.NodeInfo, bool, *framework.Status)
- func (pl *Plugin) BeforePreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) (*corev1.Pod, bool, *framework.Status)
- func (pl *Plugin) Bind(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod, ...) *framework.Status
- func (pl *Plugin) DeleteNominatedReservePod(pod *corev1.Pod)
- func (pl *Plugin) EventsToRegister() []framework.ClusterEventWithHint
- 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) GetNominatedReservation(pod *corev1.Pod, nodeName string) *frameworkext.ReservationInfo
- 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, ...) (*frameworkext.ReservationInfo, *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.PreFilterResult, *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) RegisterEndpoints(group *gin.RouterGroup)
- func (pl *Plugin) RemoveNominatedReservations(pod *corev1.Pod)
- func (pl *Plugin) RemovePod(ctx context.Context, cycleState *framework.CycleState, ...) *framework.Status
- func (pl *Plugin) ReservationScoreExtensions() frameworkext.ReservationScoreExtensions
- 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, ...)
- type ReservationCache
- type ReservationItem
Constants ¶
View Source
const ( Name = "Reservation" // ErrReasonReservationAffinity is the reason for Pod's reservation affinity/selector not matching. ErrReasonReservationAffinity = "node(s) no reservations match reservation affinity" // ErrReasonNodeNotMatchReservation is the reason for node not matching which the reserve pod specifies. ErrReasonNodeNotMatchReservation = "node(s) didn't match the nodeName specified by reservation" // ErrReasonReservationAllocatePolicyConflict is the reason for the AllocatePolicy of the Reservation conflicts with other Reservations on the node ErrReasonReservationAllocatePolicyConflict = "node(s) reservation allocate policy conflict" // ErrReasonReservationInactive is the reason for the reservation is failed/succeeded and should not be used. ErrReasonReservationInactive = "reservation is not active" // ErrReasonNoReservationsMeetRequirements is the reason for no reservation(s) to meet the requirements. ErrReasonNoReservationsMeetRequirements = "node(s) no reservation(s) to meet the requirements" // ErrReasonPreemptionFailed is the reason for preemption failed ErrReasonPreemptionFailed = "node(s) preemption failed due to insufficient resources" )
Variables ¶
This section is empty.
Functions ¶
func SetReservationCache ¶ added in v1.3.0
func SetReservationCache(cache ReservationCache)
Types ¶
type NodeReservations ¶ added in v1.3.0
type NodeReservations struct {
Items []ReservationItem `json:"items,omitempty"`
}
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) AddNominatedReservation ¶ added in v1.4.0
func (pl *Plugin) AddNominatedReservation(pod *corev1.Pod, nodeName string, rInfo *frameworkext.ReservationInfo)
func (*Plugin) AddNominatedReservePod ¶ added in v1.5.0
func (*Plugin) AfterPreFilter ¶ added in v1.2.0
func (*Plugin) BeforeFilter ¶ added in v1.2.0
func (*Plugin) BeforePreFilter ¶ added in v1.2.0
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) DeleteNominatedReservePod ¶ added in v1.5.0
func (*Plugin) EventsToRegister ¶ added in v1.3.0
func (pl *Plugin) EventsToRegister() []framework.ClusterEventWithHint
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, reservationInfo *frameworkext.ReservationInfo, nodeName string) *framework.Status
func (*Plugin) GetNominatedReservation ¶ added in v1.4.0
func (pl *Plugin) GetNominatedReservation(pod *corev1.Pod, nodeName string) *frameworkext.ReservationInfo
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) (*frameworkext.ReservationInfo, *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.PreFilterResult, *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) RegisterEndpoints ¶ added in v1.3.0
func (pl *Plugin) RegisterEndpoints(group *gin.RouterGroup)
func (*Plugin) RemoveNominatedReservations ¶ added in v1.4.0
func (*Plugin) ReservationScoreExtensions ¶ added in v1.4.0
func (pl *Plugin) ReservationScoreExtensions() frameworkext.ReservationScoreExtensions
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, reservationInfo *frameworkext.ReservationInfo, nodeName string) (int64, *framework.Status)
type ReservationCache ¶ added in v1.3.0
type ReservationCache interface { DeleteReservation(r *schedulingv1alpha1.Reservation) *frameworkext.ReservationInfo GetReservationInfoByPod(pod *corev1.Pod, nodeName string) *frameworkext.ReservationInfo }
func GetReservationCache ¶ added in v1.3.0
func GetReservationCache() ReservationCache
type ReservationItem ¶ added in v1.3.0
type ReservationItem struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` UID types.UID `json:"uid,omitempty"` Kind string `json:"kind,omitempty"` Available bool `json:"available,omitempty"` AllocateOnce bool `json:"allocateOnce,omitempty"` Allocatable corev1.ResourceList `json:"allocatable,omitempty"` Allocated corev1.ResourceList `json:"allocated,omitempty"` AllocatablePorts framework.HostPortInfo `json:"allocatablePorts,omitempty"` AllocatedPorts framework.HostPortInfo `json:"allocatedPorts,omitempty"` Owners []schedulingv1alpha1.ReservationOwner `json:"owners,omitempty"` AllocatePolicy schedulingv1alpha1.ReservationAllocatePolicy `json:"allocatePolicy,omitempty"` AssignedPods []*frameworkext.PodRequirement `json:"assignedPods,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.