Commit Graph

13 Commits

Author SHA1 Message Date
Antti Kervinen
5fe8174077 fpga_plugin: add kustomization files
- Add script/fpga-plugin-prepare-for-kustomization.sh, creates contents
  for the secret needed by the fpga plugin webhook.
- Single-command fpga plugin + webhook deployment for both modes:
  - `kubectl create -k deployments/fpga_plugin/overlays/af`
  - `kubectl create -k deployments/fpga_plugin/overlays/region`
- Change intel-fpga-plugin image CMD to ENTRYPOINT.
2020-02-24 16:32:26 +02:00
Ed Bartosh
205d32a6c6 fpga_plugin: move termination-log out of /dev
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
2020-01-14 11:58:44 +02:00
Ed Bartosh
06c07a5961 deployments/fpga_plugin: limit host mounts
The default deployment gives rather wide host mounts.

Limited sysfs mount only to the subdirectory the plugin
needs.

Mounted sysfs and dev  mounts read-only.

Added notes that FPGA plugin can be run as non-root user.
2019-12-12 13:07:19 +02:00
Mikko Ylinen
7a8ff9ccc1 deployments: set readOnlyRootFilesystem
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-30 12:53:17 +03:00
Mikko Ylinen
d06f98690f images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel,
start using intel/ prefix.

Moreover, set the Makefile variables so that the images built
by make [images|demos] can easily be pushed to any registry/org
by 'docker push' (e.g., by Jenkins).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-29 13:21:19 +03:00
Ed Bartosh
a4c124777a fpga: fix deployment setup
- used ENTRYPOINT instead of CMD in plugin and admission webhook
  Dockerfiles to avoid duplicating commands in the pod yamls
- fixed path to deploy.sh script in fpga initcontainer Dockerfile
2019-08-27 11:03:03 +03:00
Alexander Kanevskiy
6fd729f12c Cleanup and fixes for FPGA initcontainer
- Simplify initcontainer, we don't need OPAE anymore
- Remove old initcontainer related files
2019-08-25 02:37:07 +03:00
Alexander Kanevskiy
6b74f87770 Update for init container image
- Updated OpenCL SDK runtime to 1.2 release
- Minimize result container image
2019-06-17 20:09:42 +03:00
Ubuntu
ded152e8a4 Move FPGA plugin to Distroless and Clearlinux
Signed-off-by: Ubuntu <hector.augusto.garcia.baleon@intel.com>
2019-06-14 18:11:32 +00:00
Ed Bartosh
891d69de83 Use buildah to build images
Added alternative builder for project images: buildah
https://github.com/containers/buildah

Considering that some of our plugins use CRI-O runtime it could be
a good idea to get rid of docker as a builder. It should allow us
not to run docker daemon at all, even for build purposes.

Kubernetes also goes this way encouraging users to switch to CRI
runtimes (CRI-O and containerd), so having non-docker builds supported
looks good from this perspective too.
2018-09-28 17:21:12 +03:00
Ed Bartosh
c446c6cd8d fix CRI hook configuration in initcontainer
Current configuration has incorrect keywords that caused
CRI not to call prestart hook.
2018-09-11 15:34:38 +03:00
Ed Bartosh
835cc54942 create initcontainer for FPGA plugin daemonset
Fixes: #76
2018-08-27 12:56:38 +03:00
Dmitry Rozhkov
861b23308d Check node's annotations to set mode of FPGA plugin 2018-06-20 09:45:43 +03:00