mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #99937 from wzshiming/fea/enq-nodelabel
Implement EnqueueExtensions interface in nodelabel
This commit is contained in:
commit
10ed4502f4
@ -69,6 +69,7 @@ type NodeLabel struct {
|
||||
|
||||
var _ framework.FilterPlugin = &NodeLabel{}
|
||||
var _ framework.ScorePlugin = &NodeLabel{}
|
||||
var _ framework.EnqueueExtensions = &NodeLabel{}
|
||||
|
||||
// Name returns name of the plugin. It is used in logs, etc.
|
||||
func (pl *NodeLabel) Name() string {
|
||||
@ -151,3 +152,11 @@ func (pl *NodeLabel) Score(ctx context.Context, state *framework.CycleState, pod
|
||||
func (pl *NodeLabel) ScoreExtensions() framework.ScoreExtensions {
|
||||
return nil
|
||||
}
|
||||
|
||||
// EventsToRegister returns the possible events that may make a Pod
|
||||
// failed by this plugin schedulable.
|
||||
func (pl *NodeLabel) EventsToRegister() []framework.ClusterEvent {
|
||||
return []framework.ClusterEvent{
|
||||
{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user