Documentation ¶
Index ¶
- Constants
- func New(obj runtime.Object, handle framework.Handle) (framework.Plugin, error)
- type KusciaScheduling
- func (cs *KusciaScheduling) EventsToRegister() []framework.ClusterEvent
- func (cs *KusciaScheduling) Name() string
- func (cs *KusciaScheduling) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration)
- func (cs *KusciaScheduling) PostBind(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeName string)
- func (cs *KusciaScheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (*framework.PostFilterResult, *framework.Status)
- func (cs *KusciaScheduling) PreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (cs *KusciaScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (cs *KusciaScheduling) PreFilterExtensions() framework.PreFilterExtensions
- func (cs *KusciaScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (cs *KusciaScheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
Constants ¶
const (
// Name is the name of the plugin used in Registry and configurations.
Name = "KusciaScheduling"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KusciaScheduling ¶
type KusciaScheduling struct {
// contains filtered or unexported fields
}
KusciaScheduling is a plugin that schedules pods in a group.
func (*KusciaScheduling) EventsToRegister ¶
func (cs *KusciaScheduling) EventsToRegister() []framework.ClusterEvent
func (*KusciaScheduling) Name ¶
func (cs *KusciaScheduling) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*KusciaScheduling) Permit ¶
func (cs *KusciaScheduling) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration)
Permit is the functions invoked by the framework at "Permit" extension point.
func (*KusciaScheduling) PostBind ¶
func (cs *KusciaScheduling) PostBind(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeName string)
PostBind is called after a pod is successfully bound. These plugins are used update TaskResource when pod is bound.
func (*KusciaScheduling) PostFilter ¶
func (cs *KusciaScheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status)
PostFilter is used to reject a group of pods if a pod does not pass PreFilter or Filter.
func (*KusciaScheduling) PreBind ¶
func (cs *KusciaScheduling) PreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
PreBind is used to patch task resource status.
func (*KusciaScheduling) PreFilter ¶
func (cs *KusciaScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter performs the following validations. 1. Whether the TaskResourceGroup that the Pod belongs to is on the deny list. 2. Whether the total number of pods in a TaskResourceGroup is less than its `minReservedMember`.
func (*KusciaScheduling) PreFilterExtensions ¶
func (cs *KusciaScheduling) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns a PreFilterExtensions interface if the plugin implements one.
func (*KusciaScheduling) Reserve ¶
func (cs *KusciaScheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
Reserve is the functions invoked by the framework at "reserve" extension point.
func (*KusciaScheduling) Unreserve ¶
func (cs *KusciaScheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
Unreserve rejects all other Pods in the TaskResource when one of the pods in the times out.