Skip to content
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

Rename namespace in demo script launching driver #275

Merged
merged 1 commit into from
Mar 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/clusters/kind/install-dra-driver-gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ source "${CURRENT_DIR}/scripts/common.sh"

kubectl label node -l node-role.x-k8s.io/worker --overwrite nvidia.com/gpu.present=true

helm upgrade -i --create-namespace --namespace nvidia nvidia-dra-driver-gpu ${PROJECT_DIR}/deployments/helm/nvidia-dra-driver-gpu \
helm upgrade -i --create-namespace --namespace nvidia-dra-driver-gpu nvidia-dra-driver-gpu ${PROJECT_DIR}/deployments/helm/nvidia-dra-driver-gpu \
Copy link
Member

Choose a reason for hiding this comment

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

@klueska this isn't a blocker, but why don't we want to use the nvidia namespace here? Is it commonplace to have the deployment and the namespace be the same?

Copy link
Contributor

@jgehrcke jgehrcke Mar 10, 2025

Choose a reason for hiding this comment

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

Kevin will provide his reasons for the change.

But I can imagine that it is actually very important to do that from a security point of view:

We start privileged containers and hence want to make sure we run this in a unique namespace, not shared with anything else.

The reason would be to help our users to adopt the principle of least privilege.

The nvidia namespace might maybe be used by other things, and a wider range of users/service accounts might therefore have access to it.

Maybe I am wrong here. But this topic strongly relates to one major TODO item: we need to have a clear stance and simple documentation for a secure deployment of this component (doing great in terms of secure-deployment-documentation is the major outcome of our TAVA process, too).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it' mostly about keeping things namespaces specifically to this component for the demo scripts. In practice, we should recommend people to deploy this in the gpu-operator namespace since the eventual plan is to include it as one of its operands.

${NVIDIA_CTK_PATH:+--set nvidiaCtkPath=${NVIDIA_CTK_PATH}} \
${NVIDIA_DRIVER_ROOT:+--set nvidiaDriverRoot=${NVIDIA_DRIVER_ROOT}} \
${MASK_NVIDIA_DRIVER_PARAMS:+--set maskNvidiaDriverParams=${MASK_NVIDIA_DRIVER_PARAMS}} \
Expand All @@ -34,5 +34,5 @@ helm upgrade -i --create-namespace --namespace nvidia nvidia-dra-driver-gpu ${PR
set +x
printf '\033[0;32m'
echo "Driver installation complete:"
kubectl get pod -n nvidia
kubectl get pod -n nvidia-dra-driver-gpu
printf '\033[0m'