clean unused predicate error

This commit is contained in:
Alex Wang
2020-01-10 13:06:29 +08:00
parent da9fdc933b
commit 0bab010b45
3 changed files with 25 additions and 71 deletions

View File

@@ -38,8 +38,8 @@ const (
// Using the name of the plugin will likely help us avoid collisions with other plugins.
preFilterStateKey = "PreFilter" + Name
// ErrServiceAffinityViolated is used for CheckServiceAffinity predicate error.
ErrServiceAffinityViolated = "node(s) didn't match service affinity"
// ErrReason is used for CheckServiceAffinity predicate error.
ErrReason = "node(s) didn't match service affinity"
)
// Args holds the args that are used to configure the plugin.
@@ -277,7 +277,7 @@ func (pl *ServiceAffinity) Filter(ctx context.Context, cycleState *framework.Cyc
return nil
}
return framework.NewStatus(framework.Unschedulable, ErrServiceAffinityViolated)
return framework.NewStatus(framework.Unschedulable, ErrReason)
}
// Score invoked at the Score extension point.