• Jiaying Zhang's avatar
    Device plugin code refactoring to cope with file move. · ff4e8d42
    Jiaying Zhang authored
    While moving device_plugin_handler_test.go from pkg/kubelet/cm/ to
    pkg/kubelet/cm/deviceplugin/, we can no longer uses cm in its tests
    because that would cause a cycle dependency. To solve this problem,
    I moved the main cm GetResources functionality as well as part of the
    current device plugin handler Allocate functionality into a new device
    plugin handler function, GetDeviceRunContainerOptions(). This
    refactoring is also needed by another PR 51895 that moves device
    allocation into admission phase. Now device plugin handler Allocate()
    first checks whether there is cached device runtime state and only
    issues Allocate grpc call if there is no cached state available.
    The new GetDeviceRunContainerOptions() function simply returns device
    runtime config from the cached state. To support this change, extended the
    podDevices struct and checkpoint data structure with device runtime state.
    ff4e8d42
Name
Last commit
Last update
..
cpumanager Loading commit data...
cpuset Loading commit data...
deviceplugin Loading commit data...
util Loading commit data...
BUILD Loading commit data...
cgroup_manager_linux.go Loading commit data...
cgroup_manager_linux_test.go Loading commit data...
cgroup_manager_test.go Loading commit data...
cgroup_manager_unsupported.go Loading commit data...
container_manager.go Loading commit data...
container_manager_linux.go Loading commit data...
container_manager_linux_test.go Loading commit data...
container_manager_stub.go Loading commit data...
container_manager_unsupported.go Loading commit data...
container_manager_unsupported_test.go Loading commit data...
container_manager_windows.go Loading commit data...
fake_internal_container_lifecycle.go Loading commit data...
helpers_linux.go Loading commit data...
helpers_linux_test.go Loading commit data...
helpers_unsupported.go Loading commit data...
internal_container_lifecycle.go Loading commit data...
node_container_manager.go Loading commit data...
node_container_manager_test.go Loading commit data...
pod_container_manager_linux.go Loading commit data...
pod_container_manager_stub.go Loading commit data...
pod_container_manager_unsupported.go Loading commit data...
qos_container_manager_linux.go Loading commit data...
types.go Loading commit data...