mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00

runtime uses /dev/termination-log to write container termination messages. If this file doesn't exist on the host the runtime tries to create it. As /dev is read-only for intel-fpga-plugin container attempt to create /dev/termination-log fails with this error: Warning Failed kubelet, device-plugins-kubernetes-clearlinux-14-4.novalocal Error: container create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/kubelet/pods/d7262db5-e3fc-4b7b-bc2e-da245f600c4b/containers/intel-fpga-plugin/cddd0f76\\\" to rootfs \\\"/var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged\\\" at \\\"/var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged/dev/termination-log\\\" caused \\\"open /var/lib/containers/storage/overlay/edd75bb94b1b4cf93ae1ea5c064945169fb329d0abdb56b7621cddfc721f6eda/merged/dev/termination-log: read-only file system\\\"\"" Setting terminationMessagePath to rw-mounted file system /tmp/termination-log for the plugin container should fix this. Fixes: #259
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: intel-fpga-plugin
|
|
namespace: kube-system
|
|
labels:
|
|
app: intel-fpga-plugin
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: intel-fpga-plugin
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: intel-fpga-plugin
|
|
spec:
|
|
serviceAccountName: intel-fpga-plugin-controller
|
|
initContainers:
|
|
- name: intel-fpga-initcontainer
|
|
image: intel/intel-fpga-initcontainer:devel
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
volumeMounts:
|
|
- mountPath: /opt/intel/fpga-sw
|
|
name: intel-fpga-sw
|
|
- mountPath: /etc/containers/oci/hooks.d
|
|
name: oci-hooks-config
|
|
containers:
|
|
- name: intel-fpga-plugin
|
|
env:
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
image: intel/intel-fpga-plugin:devel
|
|
imagePullPolicy: IfNotPresent
|
|
terminationMessagePath: /tmp/termination-log
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
volumeMounts:
|
|
- name: devfs
|
|
mountPath: /dev
|
|
readOnly: true
|
|
- name: sysfs
|
|
mountPath: /sys/class
|
|
readOnly: true
|
|
- name: kubeletsockets
|
|
mountPath: /var/lib/kubelet/device-plugins
|
|
volumes:
|
|
- name: devfs
|
|
hostPath:
|
|
path: /dev
|
|
- name: sysfs
|
|
hostPath:
|
|
path: /sys/class
|
|
- name: kubeletsockets
|
|
hostPath:
|
|
path: /var/lib/kubelet/device-plugins
|
|
- name: intel-fpga-sw
|
|
hostPath:
|
|
path: /opt/intel/fpga-sw
|
|
type: DirectoryOrCreate
|
|
- name: oci-hooks-config
|
|
hostPath:
|
|
path: /etc/containers/oci/hooks.d
|
|
type: DirectoryOrCreate
|