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:
		| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jiaying Zhang
					Jiaying Zhang