mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
In DevicePluginHandlerImpl.Allocate(), skips untracked extended resources.
Otherwise, we would fail a Pod allocation request that has an extended resource not managed by any device plugin.
This commit is contained in:
parent
6ac018af01
commit
ee1ffa619b
@ -166,7 +166,8 @@ func (h *DevicePluginHandlerImpl) Allocate(pod *v1.Pod, container *v1.Container,
|
|||||||
resource := string(k)
|
resource := string(k)
|
||||||
needed := int(v.Value())
|
needed := int(v.Value())
|
||||||
glog.V(3).Infof("needs %d %s", needed, resource)
|
glog.V(3).Infof("needs %d %s", needed, resource)
|
||||||
if !deviceplugin.IsDeviceName(k) || needed == 0 {
|
_, registeredResource := h.allDevices[resource]
|
||||||
|
if !registeredResource || needed == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
h.Lock()
|
h.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user