Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions packages/kubernetes-1.35/kubelet-env-nvidia
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[required-extensions]
kubernetes = { version = "v1", helpers = ["join_node_taints"] }
std = { version = "v1", helpers = ["join_map"] }
+++
NODE_IP={{settings.kubernetes.node-ip}}
NODE_LABELS=nvidia.com/gpu.present=true,{{join_map "=" "," "no-fail-if-missing" settings.kubernetes.node-labels}}
Comment thread
arnaldo2792 marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't cause any errors or warnings if no other node labels are present?

NODE_LABELS=nvidia.com/gpu.present=true,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have a node that doesn't set any labels through user data, I still saw the new label applied:

❯ kubectl get nodes -l nvidia.com/gpu.present=true
NAME                                           STATUS   ROLES    AGE     VERSION
ip-192-168-68-129.us-west-2.compute.internal   Ready    <none>   8m10s   v1.35.0-eks-ac2d5a0

I inspected the kubelet logs and I didn't see any warnings or info logs for the labels.

NODE_TAINTS={{join_node_taints settings.kubernetes.node-taints}}
3 changes: 3 additions & 0 deletions packages/kubernetes-1.35/kubernetes-1.35.spec
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Source13: etc-kubernetes-pki-private.mount
Source14: credential-provider-config-yaml
Source15: logdog.kubelet.conf
Source16: multi-user-uphold-kubelet.conf
Source17: kubelet-env-nvidia

# ExecStartPre drop-ins
Source20: prestart-load-pause-ctr.conf
Expand Down Expand Up @@ -200,6 +201,7 @@ install -p -m 0644 %{S:20} %{S:21} %{S:22} %{buildroot}%{_cross_unitdir}/kubelet

mkdir -p %{buildroot}%{_cross_templatedir}
install -m 0644 %{S:2} %{buildroot}%{_cross_templatedir}/kubelet-env
install -m 0644 %{S:17} %{buildroot}%{_cross_templatedir}/kubelet-env-nvidia
install -m 0644 %{S:3} %{buildroot}%{_cross_templatedir}/kubelet-config
install -m 0644 %{S:4} %{buildroot}%{_cross_templatedir}/kubelet-kubeconfig
install -m 0644 %{S:5} %{buildroot}%{_cross_templatedir}/kubernetes-ca-crt
Expand Down Expand Up @@ -244,6 +246,7 @@ install -p -m 0644 %{S:102} %{buildroot}%{_cross_templatedir}/pod-infra-containe
%{_cross_unitdir}/multi-user.target.d/10-kubelet-service.conf
%dir %{_cross_templatedir}
%{_cross_templatedir}/kubelet-env
%{_cross_templatedir}/kubelet-env-nvidia
%{_cross_templatedir}/kubelet-config
%{_cross_templatedir}/pod-infra-container-image
%{_cross_templatedir}/kubelet-kubeconfig
Expand Down
Loading