1
0

k8s intel gpu files

This commit is contained in:
Michael Balsillie 2023-03-22 01:32:01 +01:00
parent ff0d769aa5
commit ef418f2839
18 changed files with 200 additions and 0 deletions

View File

@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
labels:
app: intel-gpu-plugin
spec:
selector:
matchLabels:
app: intel-gpu-plugin
template:
metadata:
labels:
app: intel-gpu-plugin
spec:
initContainers:
- name: intel-gpu-initcontainer
image: intel/intel-gpu-initcontainer:0.26.0
imagePullPolicy: IfNotPresent
securityContext:
seLinuxOptions:
type: "container_device_plugin_init_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumeMounts:
- mountPath: /etc/kubernetes/node-feature-discovery/source.d/
name: nfd-source-hooks
containers:
- name: intel-gpu-plugin
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: intel/intel-gpu-plugin:0.26.0
imagePullPolicy: IfNotPresent
securityContext:
seLinuxOptions:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumeMounts:
- name: devfs
mountPath: /dev/dri
readOnly: true
- name: sysfs
mountPath: /sys/class/drm
readOnly: true
- name: kubeletsockets
mountPath: /var/lib/kubelet/device-plugins
volumes:
- name: devfs
hostPath:
path: /dev/dri
- name: sysfs
hostPath:
path: /sys/class/drm
- name: kubeletsockets
hostPath:
path: /var/lib/kubelet/device-plugins
- name: nfd-source-hooks
hostPath:
path: /etc/kubernetes/node-feature-discovery/source.d/
type: DirectoryOrCreate
nodeSelector:
kubernetes.io/arch: amd64

View File

@ -0,0 +1,2 @@
resources:
- intel-gpu-plugin.yaml

View File

@ -0,0 +1,2 @@
bases:
- base

View File

@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
containers:
- name: intel-gpu-plugin
args:
- "-shared-dev-num=300"
- "-resource-manager"

View File

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
nodeSelector:
intel.feature.node.kubernetes.io/gpu: "true"

View File

@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
containers:
- name: intel-gpu-plugin
volumeMounts:
- name: podresources
mountPath: /var/lib/kubelet/pod-resources
volumes:
- name: podresources
hostPath:
path: /var/lib/kubelet/pod-resources

View File

@ -0,0 +1,8 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
serviceAccountName: gpu-manager-sa

View File

@ -0,0 +1,8 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: gpu-manager-role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["list"]

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: gpu-manager-rolebinding
subjects:
- kind: ServiceAccount
name: gpu-manager-sa
namespace: default
roleRef:
kind: ClusterRole
name: gpu-manager-role
apiGroup: rbac.authorization.k8s.io

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: gpu-manager-sa

View File

@ -0,0 +1,11 @@
bases:
- ../../base
resources:
- gpu-manager-rolebinding.yaml
- gpu-manager-role.yaml
- gpu-manager-sa.yaml
patches:
- path: add-serviceaccount.yaml
- path: add-podresource-mount.yaml
- path: add-args.yaml
- path: add-nodeselector-intel-gpu.yaml

View File

@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
containers:
- name: intel-gpu-plugin
args:
- "-shared-dev-num=30"
- "-enable-monitoring"
- "-v=2"

View File

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
nodeSelector:
intel.feature.node.kubernetes.io/gpu: "true"

View File

@ -0,0 +1,5 @@
bases:
- ../../base
patches:
- path: add-args.yaml
- path: add-nodeselector-intel-gpu.yaml

View File

@ -0,0 +1,5 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
namespace: kube-system

View File

@ -0,0 +1,4 @@
bases:
- ../../base
patches:
- path: add-namespace-kube-system.yaml

View File

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-gpu-plugin
spec:
template:
spec:
nodeSelector:
intel.feature.node.kubernetes.io/gpu: "true"

View File

@ -0,0 +1,4 @@
bases:
- ../../base
patches:
- path: add-nodeselector-intel-gpu.yaml