Documentation ¶
Index ¶
- Constants
- func New(obj runtime.Object, handle framework.Handle) (framework.Plugin, error)
- type Coscheduling
- func (cs *Coscheduling) EventsToRegister() []framework.ClusterEvent
- func (cs *Coscheduling) Less(podInfo1, podInfo2 *framework.QueuedPodInfo) bool
- func (cs *Coscheduling) Name() string
- func (cs *Coscheduling) Permit(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (*framework.Status, time.Duration)
- func (cs *Coscheduling) PostBind(ctx context.Context, _ *framework.CycleState, pod *v1.Pod, nodeName string)
- func (cs *Coscheduling) PostFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) (*framework.PostFilterResult, *framework.Status)
- func (cs *Coscheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (cs *Coscheduling) PreFilterExtensions() framework.PreFilterExtensions
- func (cs *Coscheduling) Reserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status
- func (cs *Coscheduling) 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 = "Coscheduling"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coscheduling ¶
type Coscheduling struct {
// contains filtered or unexported fields
}
Coscheduling is a plugin that schedules pods in a group.
func (*Coscheduling) EventsToRegister ¶
func (cs *Coscheduling) EventsToRegister() []framework.ClusterEvent
func (*Coscheduling) Less ¶
func (cs *Coscheduling) Less(podInfo1, podInfo2 *framework.QueuedPodInfo) bool
Less is used to sort pods in the scheduling queue in the following order. 1. Compare the priorities of Pods. 2. Compare the initialization timestamps of PodGroups or Pods. 3. Compare the keys of PodGroups/Pods: <namespace>/<podname>.
func (*Coscheduling) Name ¶
func (cs *Coscheduling) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*Coscheduling) Permit ¶
func (cs *Coscheduling) 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 (*Coscheduling) PostBind ¶
func (cs *Coscheduling) 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 PodGroup when pod is bound.
func (*Coscheduling) PostFilter ¶
func (cs *Coscheduling) 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 (*Coscheduling) PreFilter ¶
func (cs *Coscheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter performs the following validations. 1. Whether the PodGroup that the Pod belongs to is on the deny list. 2. Whether the total number of pods in a PodGroup is less than its `minMember`.
func (*Coscheduling) PreFilterExtensions ¶
func (cs *Coscheduling) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions returns a PreFilterExtensions interface if the plugin implements one.
func (*Coscheduling) Reserve ¶
func (cs *Coscheduling) 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 (*Coscheduling) Unreserve ¶
func (cs *Coscheduling) Unreserve(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string)
Unreserve rejects all other Pods in the PodGroup when one of the pods in the group times out.