k8s intel gpu files
This commit is contained in:
parent
ff0d769aa5
commit
ef418f2839
66
ansible/roles/k8s_gpu_intel/files/base/intel-gpu-plugin.yaml
Normal file
66
ansible/roles/k8s_gpu_intel/files/base/intel-gpu-plugin.yaml
Normal 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
|
@ -0,0 +1,2 @@
|
||||
resources:
|
||||
- intel-gpu-plugin.yaml
|
2
ansible/roles/k8s_gpu_intel/files/kustomization.yaml
Normal file
2
ansible/roles/k8s_gpu_intel/files/kustomization.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
bases:
|
||||
- base
|
@ -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"
|
@ -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"
|
@ -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
|
||||
|
@ -0,0 +1,8 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: intel-gpu-plugin
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: gpu-manager-sa
|
@ -0,0 +1,8 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: gpu-manager-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["list"]
|
@ -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
|
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: gpu-manager-sa
|
@ -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
|
@ -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"
|
@ -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"
|
@ -0,0 +1,5 @@
|
||||
bases:
|
||||
- ../../base
|
||||
patches:
|
||||
- path: add-args.yaml
|
||||
- path: add-nodeselector-intel-gpu.yaml
|
@ -0,0 +1,5 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: intel-gpu-plugin
|
||||
namespace: kube-system
|
@ -0,0 +1,4 @@
|
||||
bases:
|
||||
- ../../base
|
||||
patches:
|
||||
- path: add-namespace-kube-system.yaml
|
@ -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"
|
@ -0,0 +1,4 @@
|
||||
bases:
|
||||
- ../../base
|
||||
patches:
|
||||
- path: add-nodeselector-intel-gpu.yaml
|
Loading…
Reference in New Issue
Block a user