DiscoveryHandlerservice defined in
discovery.proto. In order to be utilized, a Discovery Handler must register with the Agent, which hosts the
Registrationservice defined in
brokerPropertiesas environment variables in all Pods that request this device's resource. This information is also set in the
brokerPropertiessection of the Instance the Agent creates to represent the discovered leaf device. In the Instance, the Agent also lists itself as a node that can access the device under
nodes. Note how Instance has 3 available
deviceUsageslots, since capacity was set to 3 and no brokers have been scheduled to the leaf device yet.
allocateon the device plugin running in the Agent for the requested leaf device. When calling
allocate, the kubelet requests a specific
deviceUsageslot. Let's say the kubelet requested
akri-<protocolA>-<hash>-1. The leaf device's device plugin checks to see that the requested
deviceUsageslot has not been taken by another node. If it is available, it reserves that
deviceUsageslot for this node (as shown below) and returns true. In the
allocateresponse, the Agent also tells kubelet to mount the
Instance.brokerPropertiesas environment variables in the broker Pod.
falseif kubelet requests a
deviceUsageslot that is already taken. See the resource sharing document for a better understanding on how this is resolved. Otherwise, upon a
trueresult, the kubelet will run the pod. The broker is now running and has the information necessary to communicate with the specific device.