diff --git a/docs/advanced/addons/nvidiadrivertoolkit.md b/docs/advanced/addons/nvidiadrivertoolkit.md index bcca408741..3ffd9c0885 100644 --- a/docs/advanced/addons/nvidiadrivertoolkit.md +++ b/docs/advanced/addons/nvidiadrivertoolkit.md @@ -46,4 +46,42 @@ kubectl annotate nodes {node name} sriovgpu.harvesterhci.io/custom-driver=https: The nvidia-driver-toolkit installs the specified driver version upon starting. -If an NVIDIA driver was previously installed, you must restart the pod to trigger the installation process again. \ No newline at end of file +If an NVIDIA driver was previously installed, you must restart the pod to trigger the installation process again. + +## Advanced Node Scheduling with Node Affinity + +_Available as of v1.8.0_ + +Starting from v1.8.0, the nvidia-driver-toolkit uses Kubernetes `nodeAffinity` for more flexible node scheduling. + +### Customizing Node Affinity + +You can customize the node affinity settings to meet your specific requirements. For example: + +**Example: Install on nodes with specific GPU models** + +```yaml +affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: sriovgpu.harvesterhci.io/driver-needed + operator: In + values: + - "true" + - key: gpu.model + operator: In + values: + - "A100" + - "A40" +``` + +### Applying Custom Node Affinity + +To apply custom node affinity settings: + +1. Edit the nvidia-driver-toolkit addon configuration through the Harvester UI or by editing the Helm values +2. Update the `affinity` section with your desired configuration +3. Save the changes - the DaemonSet will be updated automatically +