intel-device-plugins-for-kubernetes

module
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: Apache-2.0

README

Overview

Build Status Go Report Card GoDoc

This repository contains a framework for developing plugins for the Kubernetes device plugins framework, along with a number of device plugin implementations utilizing that framework.

The v0.26 release is the latest feature release with its documentation available here.

Table of Contents

Prerequisites

Prerequisites for building and running these device plugins include:

Plugins

The below sections detail existing plugins developed using the framework.

GPU Device Plugin

The GPU device plugin provides access to discrete and integrated Intel GPU device files.

The demo subdirectory contains both a GPU plugin demo video and an OpenCL sample deployment (intelgpu-job.yaml).

FPGA Device Plugin

The FPGA device plugin supports FPGA passthrough for the following hardware:

  • Intel® Arria® 10 devices
  • Intel® Stratix® 10 devices

The FPGA plugin comes as three parts.

Refer to each individual sub-components documentation for more details. Brief overviews of the sub-components are below.

The demo subdirectory contains a video showing deployment and use of the FPGA plugin. Sources relating to the demo can be found in the opae-nlb-demo subdirectory.

Device Plugin

The FPGA device plugin is responsible for discovering and reporting FPGA devices to kubelet.

Admission Controller

The FPGA admission controller webhook is responsible for performing mapping from user-friendly function IDs to the Interface ID and Bitstream ID that are required for FPGA programming. It also implements access control by namespacing FPGA configuration information.

CRI-O Prestart Hook

The FPGA prestart CRI-O hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description.

QAT Device Plugin

The QAT plugin supports device plugin for Intel QAT adapters, and includes code showing deployment via DPDK.

The demo subdirectory includes details of both a QAT DPDK demo and a QAT OpenSSL demo. Source for the OpenSSL demo can be found in the relevant subdirectory.

Details for integrating the QAT device plugin into Kata Containers can be found in the Kata Containers documentation repository.

VPU Device Plugin

The VPU device plugin supports Intel VCAC-A card (https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/media-analytics-vcac-a-accelerator-card-by-celestica-datasheet.pdf) the card has:

  • 1 Intel Core i3-7100U processor
  • 12 MyriadX VPUs
  • 8GB DDR4 memory

The demo subdirectory includes details of a OpenVINO deployment and use of the VPU plugin. Sources can be found in openvino-demo.

SGX Device Plugin

The SGX device plugin allows workloads to use Intel® Software Guard Extensions (Intel® SGX) on platforms with SGX Flexible Launch Control enabled, e.g.,:

  • 3rd Generation Intel® Xeon® Scalable processor family, code-named “Ice Lake”
  • Intel® Xeon® E3 processor
  • Intel® NUC Kit NUC7CJYH

The Intel SGX plugin comes in three parts.

The demo subdirectory contains a video showing the deployment and use of the Intel SGX device plugin. Sources relating to the demo can be found in the sgx-sdk-demo and sgx-aesmd-demo subdirectories.

Brief overviews of the Intel SGX sub-components are given below.

device plugin

The SGX device plugin is responsible for discovering and reporting Intel SGX device nodes to kubelet.

Containers requesting Intel SGX resources in the cluster should not use the device plugins resources directly.

Intel SGX Admission Webhook

The Intel SGX admission webhook is responsible for performing Pod mutations based on the sgx.intel.com/quote-provider pod annotation set by the user. The purpose of the webhook is to hide the details of setting the necessary device resources and volume mounts for using Intel SGX remote attestation in the cluster. Furthermore, the Intel SGX admission webhook is responsible for writing a pod/sandbox sgx.intel.com/epc annotation that is used by Kata Containers to dynamically adjust its virtualized Intel SGX encrypted page cache (EPC) bank(s) size.

The Intel SGX admission webhook is available as part of Intel Device Plugin Operator or as a standalone SGX Admission webhook image.

Intel SGX EPC memory registration

The Intel SGX EPC memory available on each node is registered as a Kubernetes extended resource using node-feature-discovery (NFD). A custom NFD source hook is installed as part of SGX device plugin operator deployment and NFD is configured to register the Intel SGX EPC memory extended resource reported by the hook.

Containers requesting Intel SGX EPC resources in the cluster use sgx.intel.com/epc resource which is of type memory.

DSA Device Plugin

The DSA device plugin supports acceleration using the Intel Data Streaming accelerator(DSA).

DLB Device Plugin

The DLB device plugin supports Intel Dynamic Load Balancer accelerator(DLB).

IAA Device Plugin

The IAA device plugin supports acceleration using the Intel Analytics accelerator(IAA).

Device Plugins Operator

To simplify the deployment of the device plugins, a unified device plugins operator is implemented.

Currently the operator has support for the DSA, DLB, FPGA, GPU, IAA, QAT, and Intel SGX device plugins. Each device plugin has its own custom resource definition (CRD) and the corresponding controller that watches CRUD operations to those custom resources.

The Device plugins operator README gives the installation and usage details for the community operator available on operatorhub.io.

The Device plugins Operator for OCP gives the installation and usage details for the operator available on Red Hat OpenShift Container Platform.

To support interconnected GPUs in Kubernetes, XeLink sidecar is needed.

The XeLink XPU-Manager sidecar README gives information how the sidecar functions and how to use it.

Demos

The demo subdirectory contains a number of demonstrations for a variety of the available plugins.

Workload Authors

For workloads to get accesss to devices managed by the plugins, the Pod spec must specify the hardware resources needed:

spec:
  containers:
    - name: demo-container
      image: <registry>/<image>:<version>
      resources:
        limits:
          <device namespace>/<resource>: X

The summary of resources available via plugins in this repository is given in the list below.

Device Namespace : Registered Resource(s)

Developers

For information on how to develop a new plugin using the framework or work on development task in this repository, see the Developers Guide.

Supported Kubernetes Versions

Releases are made under the github releases area. Supported releases and matching Kubernetes versions are listed below:

Branch Kubernetes branch/version Status
release-0.26 Kubernetes 1.26 branch v1.26.x supported
release-0.25 Kubernetes 1.25 branch v1.25.x supported
release-0.24 Kubernetes 1.24 branch v1.24.x supported
release-0.23 Kubernetes 1.23 branch v1.23.x unsupported
release-0.22 Kubernetes 1.22 branch v1.22.x unsupported
release-0.21 Kubernetes 1.21 branch v1.21.x unsupported
release-0.20 Kubernetes 1.20 branch v1.20.x unsupported
release-0.19 Kubernetes 1.19 branch v1.19.x unsupported
release-0.18 Kubernetes 1.18 branch v1.18.x unsupported
release-0.17 Kubernetes 1.17 branch v1.17.x unsupported
release-0.15 Kubernetes 1.15 branch v1.15.x unsupported
release-0.11 Kubernetes 1.11 branch v1.11.x unsupported

Pre-built plugin images

Pre-built images of the plugins are available on the Docker hub. These images are automatically built and uploaded to the hub from the latest main branch of this repository.

Release tagged images of the components are also available on the Docker hub, tagged with their release version numbers in the format x.y.z, corresponding to the branches and releases in this repository.

Note: the default deployment files and operators are configured with imagePullPolicy IfNotPresent and can be changed with scripts/set-image-pull-policy.sh.

License

All of the source code required to build intel-device-plugins-for-kubernetes is available under Open Source licenses. The source code files identify external Go modules used. Binaries are distributed as container images on DockerHub*. Those images contain license texts and source code under /licenses.

Helm Charts

Device Plugins Helm Charts are located in Intel Helm Charts repository Intel Helm Charts. This is another way of distributing Kubernetes resources of the device plugins framework.

To add repo:

helm repo add intel https://intel.github.io/helm-charts

Directories

Path Synopsis
cmd
qat_plugin/dpdkdrv
Package dpdkdrv implements QAT device plugin for DPDK driver.
Package dpdkdrv implements QAT device plugin for DPDK driver.
Package deployments generates plugin DaemonSet object out of plugin yaml.
Package deployments generates plugin DaemonSet object out of plugin yaml.
pkg
apis/deviceplugin/v1
Package v1 contains API Schema definitions for the deviceplugin v1 API group +kubebuilder:object:generate=true +groupName=deviceplugin.intel.com
Package v1 contains API Schema definitions for the deviceplugin v1 API group +kubebuilder:object:generate=true +groupName=deviceplugin.intel.com
apis/fpga/v2
Package v2 contains API Schema definitions for the fpga.intel.com v2 API group +kubebuilder:object:generate=true +groupName=fpga.intel.com
Package v2 contains API Schema definitions for the fpga.intel.com v2 API group +kubebuilder:object:generate=true +groupName=fpga.intel.com
controllers
Package controllers contains code common for the device plugin controllers.
Package controllers contains code common for the device plugin controllers.
controllers/dlb
Package dlb contains DLB specific reconciliation logic.
Package dlb contains DLB specific reconciliation logic.
controllers/dsa
Package dsa contains DSA specific reconciliation logic.
Package dsa contains DSA specific reconciliation logic.
controllers/fpga
Package fpga contains FPGA specific reconciliation logic.
Package fpga contains FPGA specific reconciliation logic.
controllers/gpu
Package gpu contains GPU specific reconciliation logic.
Package gpu contains GPU specific reconciliation logic.
controllers/iaa
Package iaa contains IAA specific reconciliation logic.
Package iaa contains IAA specific reconciliation logic.
controllers/qat
Package qat contains QAT specific reconciliation logic.
Package qat contains QAT specific reconciliation logic.
controllers/sgx
Package sgx contains SGX specific reconciliation logic.
Package sgx contains SGX specific reconciliation logic.
deviceplugin
Package deviceplugin provides API for reporting available devices to kubelet.
Package deviceplugin provides API for reporting available devices to kubelet.
fpgacontroller
Package fpgacontroller implements reconiciling controller for AcceleratorFunction and FpgaRegion objects used in the FPGA admission webhook.
Package fpgacontroller implements reconiciling controller for AcceleratorFunction and FpgaRegion objects used in the FPGA admission webhook.
fpgacontroller/patcher
Package patcher provides functionality required to patch pods by the FPGA admission webhook.
Package patcher provides functionality required to patch pods by the FPGA admission webhook.
test
e2e/fpga
Package fpga implements E2E tests for FPGA device plugin.
Package fpga implements E2E tests for FPGA device plugin.
e2e/fpgaadmissionwebhook
Package fpgaadmissionwebhook implements E2E tests for FPGA admission webhook.
Package fpgaadmissionwebhook implements E2E tests for FPGA admission webhook.
e2e/operator
Package inteldevicepluginsoperator implements E2E tests for Intel Device Plugins Operator.
Package inteldevicepluginsoperator implements E2E tests for Intel Device Plugins Operator.
e2e/sgxadmissionwebhook
Package sgxadmissionwebhook implements E2E tests for SGX admission webhook.
Package sgxadmissionwebhook implements E2E tests for SGX admission webhook.
e2e/utils
Package utils contails utilities useful in the context of E2E tests.
Package utils contails utilities useful in the context of E2E tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL