1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

Merge pull request #1694 from ingvagabund/plugins-new-context

Extend plugin's New with a context.Context
This commit is contained in:
Kubernetes Prow Robot
2025-05-19 05:31:14 -07:00
committed by GitHub
30 changed files with 47 additions and 34 deletions

View File

@@ -63,7 +63,7 @@ func HaveEvictAnnotation(pod *v1.Pod) bool {
// New builds plugin from its arguments while passing a handle
// nolint: gocyclo
func New(args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error) {
func New(ctx context.Context, args runtime.Object, handle frameworktypes.Handle) (frameworktypes.Plugin, error) {
defaultEvictorArgs, ok := args.(*DefaultEvictorArgs)
if !ok {
return nil, fmt.Errorf("want args to be of type defaultEvictorFilterArgs, got %T", args)