Floating Server
...
Deployment Methods
Kubernetes (Helm)

Hardware Key Support

6min

As of v1.5.0 the Floating Server supports using hardware keys (Yubikey) as a license protection method. If a license requires the usage of a hardware key a valid provisioned key must be accessible from the Pod running the floating server.

Limitations

  1. Only one replica running at the same time - no HA support as of now
  2. The pod running the floating server is tied to the node which has the key connected

Requirements

  1. Kubernetes node in which a yubikey can be inserted. If running in a VM, the hypervisor must have USB passthrough support and configured.
  2. A way to passthrough the hardware key to the pod running the floating server. Akri https://docs.akri.sh/ Generic Device Plugin https://github.com/squat/generic-device-plugin

General

Getting the udev information for the device.

  1. First get the device bus and device ID with lsusb
  2. Combine them into /dev/bus/usb/<bus_id>/<device_id>
  3. Using udevadm get the atribbutes for the device udevadm info --attribute-walk --path=$(udevadm info --query=path /dev/bus/usb/<bus_id>/<device_id>)

Usually for Yubikeys these attributes are enough. But results may vary depending on system. SUBSYSTEM=="usb", ATTR{idProduct}=="0407", ATTR{idVendor}=="1050"

Setting up the floating server helm chart for use with a hardware key

  1. Set .Values.hardwareKeySupport = true - disables replicas, values for .Values.replica will be ignored and set to 1

Example - Akri plugin

  1. Install and configure Akri with udev discovery https://docs.akri.sh/user-guide/getting-started
  2. Add a udev rule for Yubikey as a separate configuration or as part of the helm chart values. (Examples 1-2 below)
  3. Add the akri flags to .Values.resoruces.limits and .Values.resources.requirments

Example 1 - akri configmap

YAML


Example 2 - setting udev rules via helm values - akri chart

YAML


Example 3 - resource values for floating server chart

YAML