Add nodeSelector to nvidia-device-plugin DaemonSet - #8859
Open
mmustafasenoglu wants to merge 1 commit into
Open
mmustafasenoglu wants to merge 1 commit into
mmustafasenoglu wants to merge 1 commit into
Conversation
The nvidia-device-plugin-daemonset only had a toleration for the nvidia.com/gpu taint but no nodeSelector, which meant it could be scheduled on non-GPU nodes. On clusters with mixed node types, this caused CrashLoopBackOff on CPU nodes and DiskPressure from restarts. Add nvidia.com/gpu.present=true nodeSelector to the DaemonSet template and a SetNodeSelector method to the DevicePlugin interface, matching the label that the NVIDIA GPU Operator sets on GPU-capable nodes. Fixes eksctl-io#8858
Contributor
|
Hello mmustafasenoglu 👋 Thank you for opening a Pull Request in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8858
The nvidia-device-plugin-daemonset only had a toleration for the
nvidia.com/gputaint but no nodeSelector, so Kubernetes could schedule it on non-GPU nodes. On clusters with mixed node types (e.g. CPU head + GPU worker), this caused CrashLoopBackOff on CPU nodes since there's no GPU to discover, and repeated restarts filled disk until kubelet applied DiskPressure taint.Changes:
pkg/addons/assets/nvidia-device-plugin.yaml: Addnvidia.com/gpu.present: truenodeSelector to the DaemonSet templatepkg/addons/device_plugin.go: AddSetNodeSelectorto theDevicePlugininterface and implement it for all device plugins (NvidiaDevicePlugin sets the GPU label, Neuron/EFA are no-ops)pkg/addons/device_plugin_test.go: Add tests for SetNodeSelector behavior