diff --git a/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go b/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go index ccbbe213aec..1aeaf23cfd4 100644 --- a/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go +++ b/pkg/kubelet/cm/topologymanager/policy_single_numa_node.go @@ -55,7 +55,7 @@ func (p *singleNumaNodePolicy) canAdmitPodResult(hint *TopologyHint) lifecycle.P } // Return hints that have valid bitmasks with exactly one bit set. -func (p *singleNumaNodePolicy) filterHints(allResourcesHints [][]TopologyHint) [][]TopologyHint { +func filterSingleNumaHints(allResourcesHints [][]TopologyHint) [][]TopologyHint { var filteredResourcesHints [][]TopologyHint for _, oneResourceHints := range allResourcesHints { var filtered []TopologyHint @@ -108,7 +108,7 @@ func (p *singleNumaNodePolicy) mergeProvidersHints(providersHints []map[string][ } // Filter to only include don't cares and hints with a single NUMA node. - allProviderHints = p.filterHints(allProviderHints) + allProviderHints = filterSingleNumaHints(allProviderHints) // Set the bestHint to return from this function as {nil false}. // This will only be returned if no better hint can be found when diff --git a/pkg/kubelet/cm/topologymanager/policy_single_numa_node_test.go b/pkg/kubelet/cm/topologymanager/policy_single_numa_node_test.go index d8664e46b5c..d201adcafbd 100644 --- a/pkg/kubelet/cm/topologymanager/policy_single_numa_node_test.go +++ b/pkg/kubelet/cm/topologymanager/policy_single_numa_node_test.go @@ -155,10 +155,8 @@ func TestPolicySingleNumaNodeFilterHints(t *testing.T) { }, } - numaNodes := []int{0, 1, 2, 3} for _, tc := range tcases { - policy := NewSingleNumaNodePolicy(numaNodes) - actual := policy.(*singleNumaNodePolicy).filterHints(tc.allResources) + actual := filterSingleNumaHints(tc.allResources) if !reflect.DeepEqual(tc.expectedResources, actual) { t.Errorf("Test Case: %s", tc.name) t.Errorf("Expected result to be %v, got %v", tc.expectedResources, actual)