|
|
|
@@ -0,0 +1,118 @@
|
|
|
|
|
---
|
|
|
|
|
# Advertises the on-board Intel iGPU as the schedulable resource
|
|
|
|
|
# `gpu.intel.com/i915`, so pods can request it without a /dev/dri hostPath or
|
|
|
|
|
# any privilege escalation — the plugin hands the render node to the container
|
|
|
|
|
# through the kubelet device-plugin API. The same resource covers both GPU
|
|
|
|
|
# compute (LLM inference) and QuickSync video transcoding; it is not
|
|
|
|
|
# compute-specific.
|
|
|
|
|
#
|
|
|
|
|
# All three nodes are MS-01 with an i9-12900H (Alder Lake-P, PCI 8086:46a6,
|
|
|
|
|
# Iris Xe 96 EU) at 0000:00:02.0. Talos carries the driver in the `i915` system
|
|
|
|
|
# extension, already present in the schematic, so no machineconfig change is
|
|
|
|
|
# needed.
|
|
|
|
|
#
|
|
|
|
|
# Vendored from upstream rather than installed via the
|
|
|
|
|
# `intel-device-plugins-gpu` Helm chart: that chart renders a `GpuDevicePlugin`
|
|
|
|
|
# custom resource, which only works alongside the Intel Device Plugin Operator
|
|
|
|
|
# and its CRDs, cert-manager webhook and controller. With one device type on
|
|
|
|
|
# three identical nodes, the operator manages nothing this DaemonSet does not.
|
|
|
|
|
#
|
|
|
|
|
# Source: intel/intel-device-plugins-for-kubernetes, v0.36.0,
|
|
|
|
|
# deployments/gpu_plugin/base/intel-gpu-plugin.yaml
|
|
|
|
|
# Upgrading means re-syncing this file against that path at the new tag and
|
|
|
|
|
# bumping the image tag below.
|
|
|
|
|
#
|
|
|
|
|
# Namespace is kube-system because the plugin mounts hostPaths (/dev/dri,
|
|
|
|
|
# /sys/class/drm, the kubelet device-plugin socket and the CDI path). The
|
|
|
|
|
# cluster enforces PodSecurity `baseline`, which forbids hostPath volumes, and
|
|
|
|
|
# kube-system is the only namespace in the API server's exemption list.
|
|
|
|
|
#
|
|
|
|
|
# Node Feature Discovery is not deployed, so upstream's `nfd_labeled_nodes`
|
|
|
|
|
# overlay is omitted along with its `intel.feature.node.kubernetes.io/gpu`
|
|
|
|
|
# nodeSelector. Every node carries the same iGPU, leaving nothing to discover;
|
|
|
|
|
# the plugin exits cleanly on a node without /dev/dri.
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: DaemonSet
|
|
|
|
|
metadata:
|
|
|
|
|
name: intel-gpu-plugin
|
|
|
|
|
namespace: kube-system
|
|
|
|
|
labels:
|
|
|
|
|
app: intel-gpu-plugin
|
|
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: intel-gpu-plugin
|
|
|
|
|
updateStrategy:
|
|
|
|
|
type: RollingUpdate
|
|
|
|
|
rollingUpdate:
|
|
|
|
|
maxSurge: 0
|
|
|
|
|
maxUnavailable: 1
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: intel-gpu-plugin
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: intel-gpu-plugin
|
|
|
|
|
env:
|
|
|
|
|
- name: NODE_NAME
|
|
|
|
|
valueFrom:
|
|
|
|
|
fieldRef:
|
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
|
- name: HOST_IP
|
|
|
|
|
valueFrom:
|
|
|
|
|
fieldRef:
|
|
|
|
|
fieldPath: status.hostIP
|
|
|
|
|
image: intel/intel-gpu-plugin:0.36.0
|
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
|
args:
|
|
|
|
|
# Slots the single iGPU is handed out as, letting that many
|
|
|
|
|
# containers share it concurrently. A slot count, not fractional
|
|
|
|
|
# accounting — nothing partitions the device between sharers, so
|
|
|
|
|
# they contend for it. Sized for an inference server plus room for
|
|
|
|
|
# a transcoder and a benchmark pod alongside it.
|
|
|
|
|
- -shared-dev-num=4
|
|
|
|
|
securityContext:
|
|
|
|
|
seLinuxOptions:
|
|
|
|
|
type: "container_device_plugin_t"
|
|
|
|
|
readOnlyRootFilesystem: true
|
|
|
|
|
allowPrivilegeEscalation: false
|
|
|
|
|
capabilities:
|
|
|
|
|
drop:
|
|
|
|
|
- ALL
|
|
|
|
|
seccompProfile:
|
|
|
|
|
type: RuntimeDefault
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "45Mi"
|
|
|
|
|
cpu: 40m
|
|
|
|
|
limits:
|
|
|
|
|
memory: "90Mi"
|
|
|
|
|
cpu: 100m
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: devfs
|
|
|
|
|
mountPath: /dev/dri
|
|
|
|
|
readOnly: true
|
|
|
|
|
- name: sysfsdrm
|
|
|
|
|
mountPath: /sys/class/drm
|
|
|
|
|
readOnly: true
|
|
|
|
|
- name: kubeletsockets
|
|
|
|
|
mountPath: /var/lib/kubelet/device-plugins
|
|
|
|
|
- name: cdipath
|
|
|
|
|
mountPath: /var/run/cdi
|
|
|
|
|
volumes:
|
|
|
|
|
- name: devfs
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /dev/dri
|
|
|
|
|
- name: sysfsdrm
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /sys/class/drm
|
|
|
|
|
- name: kubeletsockets
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /var/lib/kubelet/device-plugins
|
|
|
|
|
- name: cdipath
|
|
|
|
|
hostPath:
|
|
|
|
|
path: /var/run/cdi
|
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
|
nodeSelector:
|
|
|
|
|
kubernetes.io/arch: amd64
|