mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14: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:
@@ -451,7 +451,7 @@ func runPodLifetimePlugin(
|
||||
|
||||
maxPodLifeTimeSeconds := uint(1)
|
||||
|
||||
plugin, err := podlifetime.New(&podlifetime.PodLifeTimeArgs{
|
||||
plugin, err := podlifetime.New(ctx, &podlifetime.PodLifeTimeArgs{
|
||||
MaxPodLifeTimeSeconds: &maxPodLifeTimeSeconds,
|
||||
LabelSelector: labelSelector,
|
||||
Namespaces: namespaces,
|
||||
@@ -615,7 +615,7 @@ func TestLowNodeUtilization(t *testing.T) {
|
||||
podsBefore := len(podsOnMosttUtilizedNode)
|
||||
|
||||
t.Log("Running LowNodeUtilization plugin")
|
||||
plugin, err := nodeutilization.NewLowNodeUtilization(&nodeutilization.LowNodeUtilizationArgs{
|
||||
plugin, err := nodeutilization.NewLowNodeUtilization(ctx, &nodeutilization.LowNodeUtilizationArgs{
|
||||
Thresholds: api.ResourceThresholds{
|
||||
v1.ResourceCPU: 70,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user