diff --git a/pkg/kubelet/eviction/helpers.go b/pkg/kubelet/eviction/helpers.go index 01152eac705..466ba65dd60 100644 --- a/pkg/kubelet/eviction/helpers.go +++ b/pkg/kubelet/eviction/helpers.go @@ -139,11 +139,8 @@ func ParseThresholdConfig(allocatableConfig []string, evictionHard, evictionSoft } results = append(results, softThresholds...) for i := range results { - for signal, minReclaim := range minReclaims { - if results[i].Signal == signal { - results[i].MinReclaim = &minReclaim - break - } + if minReclaim, ok := minReclaims[results[i].Signal]; ok { + results[i].MinReclaim = &minReclaim } } for _, key := range allocatableConfig {