The FPGA Device Plugin is used to advertise Xilinx FPGA devices to the Kubelet, and it can be customized via environment variables.
For example, each Xilinx U30 card has two character devices, and you can choose to allocate a U30 computing unit based on either card or device. We can simply add the environment variable ‘U30AllocUnit’ and set it as ‘Card’ or ‘Device’ in the values file.
devicePlugin:
# deploy a device-plugin daemonset
enabled: true
repository: public.ecr.aws/xilinx_dcg
image: k8s-device-plugin
tag: 1.2.0
imagePullPolicy: IfNotPresent
env:
- name: U30NameConvention
value: CommonName
- name: U30AllocUnit
value: Card
To set values using --set
flag:
$ helm install --generate-name -n xilinx-system --create-namespace xilinx/fpga-operator \
--set devicePlugin.repository=public.ecr.aws/xilinx_dcg \
--set devicePlugin.image=k8s-device-plugin \
--set devicePlugin.tag=1.2.0 \
--set devicePlugin.env[0].name=U30NameConvention \
--set devicePlugin.env[0].value=CommonName \
--set devicePlugin.env[1].name=U30AllocUnit \
--set devicePlugin.env[1].value=Card