mirror of https://github.com/k3s-io/k3s
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.pull/6/head
parent
6ac018af01
commit
ee1ffa619b
|
@ -166,7 +166,8 @@ func (h *DevicePluginHandlerImpl) Allocate(pod *v1.Pod, container *v1.Container,
|
|||
resource := string(k)
|
||||
needed := int(v.Value())
|
||||
glog.V(3).Infof("needs %d %s", needed, resource)
|
||||
if !deviceplugin.IsDeviceName(k) || needed == 0 {
|
||||
_, registeredResource := h.allDevices[resource]
|
||||
if !registeredResource || needed == 0 {
|
||||
continue
|
||||
}
|
||||
h.Lock()
|
||||
|
|
Loading…
Reference in New Issue