Skip to content

Feat: Allow to configure kubelet root directory #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apten-fors
Copy link

@apten-fors apten-fors commented Apr 5, 2025

This pull request introduces a new configuration option KubeletRootDir to specify the root directory for the kubelet base directory. The changes include updates to the cluster policy types, CRD manifests, controllers, and tests to support this new configuration.

Configuration Enhancements:

  • Added KubeletRootDir field to the HostPathsSpec struct in api/nvidia/v1/clusterpolicy_types.go to represent the kubelet base directory.
  • Updated CRD manifests (bundle/manifests/nvidia.com_clusterpolicies.yaml, config/crd/bases/nvidia.com_clusterpolicies.yaml, deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yaml) to include the new KubeletRootDir field.

Controller Updates:

  • Added DefaultKubeletRootDir constant and updated preProcessDaemonSet function in controllers/object_controls.go to transform the kubelet root directory if a custom one is configured. [1] [2]
  • Implemented transformForKubeletRootDir function in controllers/object_controls.go to apply necessary transformations for custom kubelet root directory.

Testing:

  • Added TestTransformForKubeletRootDir function in controllers/transforms_test.go to validate the transformations for different kubelet root directory configurations.

Deployment Configuration:

  • Updated deployments/gpu-operator/templates/clusterpolicy.yaml and deployments/gpu-operator/values.yaml to include the new kubeletRootDir configuration. [1] [2]

Closes #1358
Closes #745

Copy link

copy-pr-bot bot commented Apr 5, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@xiaoyao
Copy link

xiaoyao commented Apr 7, 2025

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could DCGMExporterSpec add a field to support to specify the custom path of kubelet rootDir? Make kubelet path configurable in dcgm-exporter
2 participants