Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bases:
- ../../base
patchesStrategicMerge:
- sriov_numvfs_init.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: intel-qat-plugin
spec:
template:
spec:
initContainers:
- name: vfio-pci
image: busybox
command: ["/bin/sh", "-c", "modprobe vfio-pci"]
securityContext:
capabilities:
add:
["SYS_MODULE"]
volumeMounts:
- name: moddir
mountPath: /lib/modules/
- name: sriov-numvfs
image: busybox
command: ["/bin/sh", "-c"]
args:
- >
for dev in `for pf in 0434 0435 19a3 37c8 6f54; do lspci | awk -v dev="8086:$pf" '$0 ~ dev {print "0000:" $1}'; done`; do
DEVPATH="/sys/bus/pci/devices/$dev"
NUMVFS="$DEVPATH/sriov_numvfs"
if [ -w "$NUMVFS" -a $(cat "$NUMVFS") -eq 0 ]; then
cat "$DEVPATH/sriov_totalvfs" | tee "$NUMVFS"
fi
done
securityContext:
privileged: true
volumeMounts:
- name: sysfs
mountPath: /sys
volumes:
- name: moddir
hostPath:
path: /lib/modules/
- name: sysfs
hostPath:
path: /sys