|
| 1 | +# Copyright 2026 Google Inc. All rights reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +apiVersion: apps/v1 |
| 16 | +kind: DaemonSet |
| 17 | +metadata: |
| 18 | + name: nccl-rdma-installer |
| 19 | + namespace: kube-system |
| 20 | + labels: |
| 21 | + k8s-app: nccl-rdma-installer |
| 22 | +spec: |
| 23 | + selector: |
| 24 | + matchLabels: |
| 25 | + k8s-app: nccl-rdma-installer |
| 26 | + updateStrategy: |
| 27 | + type: RollingUpdate |
| 28 | + rollingUpdate: |
| 29 | + maxUnavailable: ${yamlencode(max_unavailable)} |
| 30 | + template: |
| 31 | + metadata: |
| 32 | + labels: |
| 33 | + name: nccl-rdma-installer |
| 34 | + k8s-app: nccl-rdma-installer |
| 35 | + spec: |
| 36 | + priorityClassName: system-node-critical |
| 37 | + affinity: |
| 38 | + nodeAffinity: |
| 39 | + ${indent(10, yamlencode(node_affinity))} |
| 40 | + tolerations: |
| 41 | + - operator: "Exists" |
| 42 | + hostNetwork: true |
| 43 | + hostPID: true |
| 44 | + volumes: |
| 45 | + - name: library-dir-host |
| 46 | + hostPath: |
| 47 | + path: /home/kubernetes/bin/nvidia/lib64 |
| 48 | + type: DirectoryOrCreate |
| 49 | + - name: gib |
| 50 | + hostPath: |
| 51 | + path: /home/kubernetes/bin/gib |
| 52 | + - name: nvidia-dir |
| 53 | + hostPath: |
| 54 | + path: /home/kubernetes/bin/nvidia |
| 55 | + type: Directory |
| 56 | + initContainers: |
| 57 | + - image: ${image}:${version} |
| 58 | + name: nccl-rdma-installer |
| 59 | + resources: |
| 60 | + requests: |
| 61 | + cpu: 150m |
| 62 | + securityContext: |
| 63 | + privileged: true |
| 64 | + volumeMounts: |
| 65 | + - name: library-dir-host |
| 66 | + mountPath: /usr/local/home/kubernetes/bin/nvidia/lib64 |
| 67 | + - name: gib |
| 68 | + mountPath: /usr/local/home/kubernetes/bin/gib |
| 69 | + command: ["/bin/sh", "-c"] |
| 70 | + args: |
| 71 | + - | |
| 72 | + set -ex |
| 73 | + /scripts/container_entry.sh install |
| 74 | + cp -r /var/lib/gib/. /usr/local/home/kubernetes/bin/gib |
| 75 | + echo "installation finishes" |
| 76 | + containers: |
| 77 | + - image: "gke.gcr.io/pause:3.8@sha256:880e63f94b145e46f1b1082bb71b85e21f16b99b180b9996407d61240ceb9830" |
| 78 | + name: pause |
0 commit comments