apiVersion: apps/v1 kind: DaemonSet metadata: labels: app: nvidia-device-plugin-daemonset name: nvidia-device-plugin-daemonset namespace: "FILLED BY THE OPERATOR" annotations: openshift.io/scc: hostmount-anyuid spec: selector: matchLabels: app: nvidia-device-plugin-daemonset template: metadata: labels: app: nvidia-device-plugin-daemonset spec: nodeSelector: nvidia.com/gpu.deploy.device-plugin: "true" tolerations: - key: nvidia.com/gpu operator: Exists effect: NoSchedule priorityClassName: system-node-critical serviceAccountName: nvidia-device-plugin initContainers: - image: "FILLED BY THE OPERATOR" name: toolkit-validation command: ['sh', '-c'] args: ["until [ -f /run/nvidia/validations/toolkit-ready ] && { grep -qsx live /sys/module/nvidia/initstate || [ -e /dev/dxg ]; }; do echo waiting for nvidia container stack to be setup; sleep 5; done"] securityContext: privileged: true volumeMounts: - name: run-nvidia-validations mountPath: /run/nvidia/validations mountPropagation: HostToContainer - image: "FILLED BY THE OPERATOR" name: config-manager-init command: ["config-manager"] env: - name: ONESHOT value: "true" - name: KUBECONFIG value: "" - name: NODE_NAME valueFrom: fieldRef: fieldPath: "spec.nodeName" - name: NODE_LABEL value: "nvidia.com/device-plugin.config" - name: CONFIG_FILE_SRCDIR value: "/available-configs" - name: CONFIG_FILE_DST value: "/config/config.yaml" - name: DEFAULT_CONFIG value: "" - name: SEND_SIGNAL value: "false" - name: SIGNAL value: "" - name: PROCESS_TO_SIGNAL value: "" containers: - image: "FILLED BY THE OPERATOR" name: nvidia-device-plugin command: ["/bin/sh", "-c"] args: - /bin/entrypoint.sh securityContext: privileged: true env: - name: PASS_DEVICE_SPECS value: "true" - name: FAIL_ON_INIT_ERROR value: "true" - name: DEVICE_LIST_STRATEGY value: envvar - name: DEVICE_ID_STRATEGY value: uuid - name: NVIDIA_VISIBLE_DEVICES value: all - name: NVIDIA_DRIVER_CAPABILITIES value: all - name: MPS_ROOT value: /run/nvidia/mps volumeMounts: - name: nvidia-device-plugin-entrypoint readOnly: true mountPath: /bin/entrypoint.sh subPath: entrypoint.sh - name: device-plugin mountPath: /var/lib/kubelet/device-plugins - name: run-nvidia-validations mountPath: /run/nvidia/validations - name: driver-install-dir mountPath: /driver-root mountPropagation: HostToContainer - name: host-root mountPath: /host readOnly: true mountPropagation: HostToContainer - name: cdi-root mountPath: /var/run/cdi # The MPS /dev/shm is needed to allow for MPS daemon health-checking. - name: mps-shm mountPath: /dev/shm - name: mps-root mountPath: /mps - image: "FILLED BY THE OPERATOR" name: config-manager command: ["config-manager"] securityContext: privileged: true env: - name: ONESHOT value: "false" - name: KUBECONFIG value: "" - name: NODE_NAME valueFrom: fieldRef: fieldPath: "spec.nodeName" - name: NODE_LABEL value: "nvidia.com/device-plugin.config" - name: CONFIG_FILE_SRCDIR value: "/available-configs" - name: CONFIG_FILE_DST value: "/config/config.yaml" - name: DEFAULT_CONFIG value: "" - name: SEND_SIGNAL value: "true" - name: SIGNAL value: "1" # SIGHUP - name: PROCESS_TO_SIGNAL value: "nvidia-device-plugin" volumes: - name: nvidia-device-plugin-entrypoint configMap: name: nvidia-device-plugin-entrypoint defaultMode: 448 - name: device-plugin hostPath: path: /var/lib/kubelet/device-plugins - name: run-nvidia-validations hostPath: path: "/run/nvidia/validations" type: DirectoryOrCreate - name: driver-install-dir hostPath: path: "/run/nvidia/driver" type: DirectoryOrCreate - name: host-root hostPath: path: / - name: cdi-root hostPath: path: /var/run/cdi type: DirectoryOrCreate - name: mps-root hostPath: path: /run/nvidia/mps type: DirectoryOrCreate - name: mps-shm hostPath: path: /run/nvidia/mps/shm