The WES device labeler is responsible for applying Kubernetes "labels" to the compute nodes based upon sensor/resource availability to assist the Kubernetes scheduler to place pods on the correct compute units. For example, if the "microphone" is physically connected to a Raspberry Pi compute unit, it labels that Raspberry Pi with the resource.microphone
label.
The device labeler reads the Waggle node's manifest ConfigMap and then applies 3 items to the kubernetes compute node (ex. 000048b02d0766be.ws-nxcore
) labels.
- the compute unit's hardware capabilities (ex.
gpu
,arm64
,cuda102
) [added asresource.*
] - the list of connected sensors [added as
resource.*
] - the compute unit's
zone
(ex.shield
) [added aszone.*
]
The list of connected sensors are verified to ensure the physical hardware sensor is available. If the hardware is not found the
resource.*
label for that sensor is NOT applied.
The test.py
file contains mocked functions for the Kubernetes function calls and simulations of the physical hardware tests. When new hardware detection is added, the simulation for that hardware detection will need to be added.