1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-27 05:46:13 +01:00

Extend plugin's New with a context.Context

The new context.Context can be later used for passing a contextualized
logger. Or, other initialization steps that require the context.
This commit is contained in:
Jan Chaloupka
2025-05-19 11:58:22 +02:00
parent d34848086c
commit 1974c12e0f
30 changed files with 47 additions and 34 deletions

View File

@@ -55,7 +55,7 @@ type HighNodeUtilization struct {
// NewHighNodeUtilization builds plugin from its arguments while passing a handle.
func NewHighNodeUtilization(
genericArgs runtime.Object, handle frameworktypes.Handle,
ctx context.Context, genericArgs runtime.Object, handle frameworktypes.Handle,
) (frameworktypes.Plugin, error) {
args, ok := genericArgs.(*HighNodeUtilizationArgs)
if !ok {