mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
implement EnqueueExtensions interface in nodelabel
This commit is contained in:
parent
0df8c69731
commit
6907b915f5
@ -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 {
|
||||
@ -135,3 +136,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