Skip to content

WES service which scan devices and updates labels on host node.

Notifications You must be signed in to change notification settings

waggle-sensor/wes-device-labeler

Repository files navigation

Device Labeler

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.

How it works

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.

  1. the compute unit's hardware capabilities (ex. gpu, arm64, cuda102) [added as resource.*]
  2. the list of connected sensors [added as resource.*]
  3. the compute unit's zone (ex. shield) [added as zone.*]

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.

Unit Testing

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.

About

WES service which scan devices and updates labels on host node.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages