feature: support Memory QoS for cgroups v2
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
@@ -58,7 +59,10 @@ func customTestRuntimeManager(keyring *credentialprovider.BasicDockerKeyring) (*
|
||||
// Only an empty machineInfo is needed here, because in unit test all containers are besteffort,
|
||||
// data in machineInfo is not used. If burstable containers are used in unit test in the future,
|
||||
// we may want to set memory capacity.
|
||||
machineInfo := &cadvisorapi.MachineInfo{}
|
||||
memoryCapacityQuantity := resource.MustParse(fakeNodeAllocatableMemory)
|
||||
machineInfo := &cadvisorapi.MachineInfo{
|
||||
MemoryCapacity: uint64(memoryCapacityQuantity.Value()),
|
||||
}
|
||||
osInterface := &containertest.FakeOS{}
|
||||
manager, err := newFakeKubeRuntimeManager(fakeRuntimeService, fakeImageService, machineInfo, osInterface, &containertest.FakeRuntimeHelper{}, keyring)
|
||||
return fakeRuntimeService, fakeImageService, manager, err
|
||||
|
Reference in New Issue
Block a user