Ensure that directory volumes have Directory type#1199
Conversation
|
@cdesiniotis @tariq1890 we should confirm whether similar changes are required for the GPU Operator. |
| - name: kubelet-device-plugins-dir | ||
| hostPath: | ||
| path: /var/lib/kubelet/device-plugins | ||
| type: DirectoryOrCreate |
There was a problem hiding this comment.
Question: Could this also be Directory instead?
There was a problem hiding this comment.
785fc35 to
c3584ec
Compare
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. |
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that Kubernetes volume mounts that are expected to be directories have explicit type specifications to improve deployment reliability and prevent runtime errors when the host paths don't exist or are incorrect types.
- Adds
type: Directoryortype: DirectoryOrCreateto hostPath volumes across multiple deployment files - Renames
device-pluginvolume to more descriptivekubelet-device-plugins-dirin several configurations - Standardizes volume type declarations for system directories like
/sysand/var/lib/kubelet/device-plugins
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| deployments/static/nvidia-device-plugin.yml | Renames volume and adds Directory type for kubelet device plugins path |
| deployments/static/nvidia-device-plugin-privileged-with-service-account.yml | Renames volume and adds DirectoryOrCreate type for kubelet device plugins path |
| deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml | Renames volume and adds Directory type for kubelet device plugins path |
| deployments/static/gpu-feature-discovery-job.yaml.template | Adds DirectoryOrCreate and Directory types for output and sys paths |
| deployments/static/gpu-feature-discovery-daemonset.yaml | Adds DirectoryOrCreate and Directory types for output and sys paths |
| deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml | Adds DirectoryOrCreate and Directory types for output and sys paths |
| deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml | Adds DirectoryOrCreate and Directory types for output and sys paths |
| deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml | Adds DirectoryOrCreate and Directory types for output and sys paths |
| deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml | Renames volume, adds Directory types for kubelet and driver paths |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| - name: kubelet-device-plugins-dir | ||
| hostPath: | ||
| path: /var/lib/kubelet/device-plugins | ||
| type: Directory |
There was a problem hiding this comment.
There's a spelling error in the PR title: 'direcory' should be 'directory'.
This change ensures that volumes that are expected to be directories have a Directory or DirectoryOrCreate type. Signed-off-by: Evan Lezar <elezar@nvidia.com>
c3584ec to
5e4c93a
Compare
This change ensures that volumes that are expected to be directories have a Directory or DirectoryOrCreate type.
See https://nvbugspro.nvidia.com/bug/5129540