intel-device-plugins-for-ku.../cmd/fpga_crihook
Mikko Ylinen facb4214a2 tree-wide: drop deprecated io/ioutil
Go 1.16 release notes announced the deprecation of io/ioutil [1]. It's easy
for us to move to use what is was recommended so just do it.

[1] https://golang.org/doc/go1.16#ioutil

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-06-02 13:41:15 +03:00
..
testdata fpga hook: language cleanup 2020-12-10 10:58:40 +02:00
main_test.go tree-wide: drop deprecated io/ioutil 2021-06-02 13:41:15 +03:00
main.go move to k8s.io v1.20.x and klog/v2 v2.4.0 2021-01-21 15:34:39 +02:00
README.md Documentation: Fixes broken links and standardizes headers. 2020-09-22 08:32:21 -07:00

Intel FPGA prestart CRI-O webhook for Kubernetes

Table of Contents

Introduction

The FPGA CRI-O webhook is one of the components used to add support for Intel FPGA devices to Kubernetes.

The FPGA prestart CRI-O hook is triggered by container annotations, such as set by the FPGA device plugin. It performs discovery of the requested FPGA function bitstream and then programs FPGA devices based on the environment variables in the workload description.

The CRI-O prestart hook is only required when the FPGA admission webhook is configured for orchestration programmed mode, and is benign (un-used) otherwise.

Note: The fpga CRI-O webhook is usually installed by the same DaemonSet as the FPGA device plugin. If building and installing the CRI-O webhook by hand, it is recommended you reference the fpga plugin DaemonSet YAML for more details.

Dependencies

This component is one of a set of components that work together. You may also want to install the following:

All components have the same basic dependencies as the generic plugin framework dependencies

Building

The following sections detail how to obtain, build and deploy the CRI-O prestart hook.

Getting the source code

$ export INTEL_DEVICE_PLUGINS_SRC=/path/to/intel-device-plugins-for-kubernetes
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes ${INTEL_DEVICE_PLUGINS_SRC}

Building the image

$ cd ${INTEL_DEVICE_PLUGINS_SRC}
$ make intel-fpga-initcontainer
...
Successfully tagged intel/intel-fpga-initcontainer:devel

Configuring CRI-O

Recent versions of CRI-O are shipped with default configuration file that prevents CRI-O to discover and configure hooks automatically. For FPGA orchestration programmed mode, the OCI hooks are the key component. Please ensure that your /etc/crio/crio.conf parameter hooks_dir is either unset (to enable default search paths for OCI hooks configuration) or contains the directory /etc/containers/oci/hooks.d.