• 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
..
api Loading commit data...
apimachinery/tests Loading commit data...
apis Loading commit data...
auth Loading commit data...
bootstrap/api Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
credentialprovider Loading commit data...
features Loading commit data...
fieldpath Loading commit data...
generated Loading commit data...
hyperkube Loading commit data...
kubeapiserver Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
master Loading commit data...
printers Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...