Merge pull request #99937 from wzshiming/fea/enq-nodelabel

Implement EnqueueExtensions interface in nodelabel
This commit is contained in:
Kubernetes Prow Robot 2021-04-08 16:00:51 -07:00 committed by GitHub
commit 10ed4502f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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},
}
}