Documentation ¶
Index ¶
- Constants
- func New(_ runtime.Object, h waitingpod.Handle) (framework.Plugin, error)
- type NodeNumber
- func (pl *NodeNumber) EventsToRegister() []framework.ClusterEvent
- func (pl *NodeNumber) Name() string
- func (pl *NodeNumber) Permit(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) (*framework.Status, time.Duration)
- func (pl *NodeNumber) PreScore(ctx context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (pl *NodeNumber) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
- func (pl *NodeNumber) ScoreExtensions() framework.ScoreExtensions
Constants ¶
View Source
const Name = "NodeNumber"
Name is the name of the plugin used in the plugin registry and configurations.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NodeNumber ¶
type NodeNumber struct {
// contains filtered or unexported fields
}
NodeNumber is a plugin that favors nodes that has the same number suffix as number suffix of pod name. And it will delay the binding of pod by {node suffix number} seconds. For example: When schedule a pod named Pod1, a Node named Node9 gets a higher score than a node named Node1. And if it is decided that Pod1 will go to Node9, this plugin delay the binding by 9 seconds.
IMPORTANT NOTE: this plugin only handle single digit numbers only.
func (*NodeNumber) EventsToRegister ¶
func (pl *NodeNumber) EventsToRegister() []framework.ClusterEvent
func (*NodeNumber) Name ¶
func (pl *NodeNumber) Name() string
Name returns name of the plugin. It is used in logs, etc.
func (*NodeNumber) Score ¶
func (pl *NodeNumber) Score(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status)
Score invoked at the score extension point.
func (*NodeNumber) ScoreExtensions ¶
func (pl *NodeNumber) ScoreExtensions() framework.ScoreExtensions
ScoreExtensions of the Score plugin.
Click to show internal directories.
Click to hide internal directories.