Skip to content

Ensure that directory volumes have Directory type#1199

Merged
elezar merged 1 commit intoNVIDIA:mainfrom
elezar:check-directory-mounts
Aug 15, 2025
Merged

Ensure that directory volumes have Directory type#1199
elezar merged 1 commit intoNVIDIA:mainfrom
elezar:check-directory-mounts

Conversation

@elezar
Copy link
Member

@elezar elezar commented Mar 14, 2025

This change ensures that volumes that are expected to be directories have a Directory or DirectoryOrCreate type.

See https://nvbugspro.nvidia.com/bug/5129540

@elezar
Copy link
Member Author

elezar commented Mar 14, 2025

@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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Could this also be Directory instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elezar elezar force-pushed the check-directory-mounts branch from 785fc35 to c3584ec Compare March 14, 2025 08:05
@github-actions
Copy link

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.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2025
@elezar elezar requested a review from ArangoGutierrez June 17, 2025 11:12
@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: Directory or type: DirectoryOrCreate to hostPath volumes across multiple deployment files
  • Renames device-plugin volume to more descriptive kubelet-device-plugins-dir in several configurations
  • Standardizes volume type declarations for system directories like /sys and /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
Copy link

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a spelling error in the PR title: 'direcory' should be 'directory'.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ ^

@elezar elezar changed the title Ensure that direcory volumes have Directory type Ensure that directory volumes have Directory type Aug 15, 2025
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>
@elezar elezar force-pushed the check-directory-mounts branch from c3584ec to 5e4c93a Compare August 15, 2025 08:15
@elezar elezar added this to the v0.17.x milestone Aug 15, 2025
@elezar elezar self-assigned this Aug 15, 2025
@elezar elezar merged commit 1ddd323 into NVIDIA:main Aug 15, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants