Commit Graph

32 Commits

Author SHA1 Message Date
Oleg Zhurakivskyy
ab0e8bc146 qat: Add annotation configurability in the operator
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2024-01-09 10:20:16 +02:00
Tuomas Katila
cb04ca0deb deployments: move from 'patchesStrategicMerge' to 'patches'
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-03 10:37:44 +03:00
Tuomas Katila
ec2930b331 deployments: move from 'bases' to 'resources'
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-03 10:37:44 +03:00
Hyeongju Johannes Lee
1a41402903 qat init: make conf optional 2023-04-27 12:48:27 -07:00
Hyeongju Johannes Lee
a6037eae3c
qat: add configuration of cfgServices to qat initcontainer
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-12-12 21:48:21 +02:00
Mikko Ylinen
8c0abb54b1 deployments: disable unused serviceAccounts for plugins
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-23 08:21:25 +03:00
Manish Regmi
a888a91d2a add selinux labels for QAT
Signed-off-by: Manish Regmi <manish.regmi@intel.com>
2022-09-19 15:31:55 -07:00
Alex Nordlund
79986a6096 Replace to-be obsolete patchesStrategicMerge with patches 2022-08-25 21:07:32 +02:00
Alex Nordlund
0636e2d3a1 Replace obsolete patches with patchesStrategicMerge
This was made obsolete in v1.0.9
https://github.com/kubernetes-sigs/kustomize/blob/v1.0.9/pkg/types/kustomization.go#L129
And stopped working in v3.0.3
https://github.com/kubernetes-sigs/kustomize/issues/1373
2022-08-25 09:28:03 +02:00
Mikko Ylinen
069b9bd79a qat: 4xxx: split generic resource to compression and crypto
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-04-07 22:33:17 +03:00
Hyeongju Johannes Lee
df419b3a82 qat: add initimage to plugin
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-03-30 13:46:42 -07:00
Ed Bartosh
13780a8cdc implement terrascan check
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-03-01 15:54:28 +02:00
Mikko Ylinen
7c381097c0 qat: add kustomize overlay for e2e tests
e2e combines all existing overlays: apparmor, debug, and sriov_numfs.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-12-22 11:51:32 +02:00
Hyeongju Johannes Lee
251727a3db operator: add node selection constraint (amd64 arch)
In order to make controllers consistent, I add a nodeselector constraint of daemonset to dlb, fpga, qat too.
Since the same code is commonly used in many files, I add a function that replaces duplicated code.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-12-02 08:54:50 -08:00
Mikko Ylinen
b921a4a458 qat: update default flags and deploy without ConfigMap
To make QAT plugin deployment consistent with the other plugins
we update the default flags and deploy without the flag settings
provided by the ConfigMap.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-11-18 14:02:36 +02:00
Mikko Ylinen
caa6f260dd e2e: qat: use sriov_numvfs overlay in tests
To simplify the e2e node setup, change the QAT tests to deploy with
the sriov_numvfs overlay.

Moreover, as we are seeing the vfio-pci driver becoming built-in and
requiring opt-in parameters depending on the kernel version, it's
better to move the vfio-pci initcontainer step(s) to kernel cmdline/
modules-load.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-10-19 14:32:06 +03:00
Mikko Ylinen
9d0d6cbe11 qat: set c6xxvf and 4xxxvf to default devices
The devices enabled by default are different between the
kustomize and operator based deployments.

This change harmonizes the defaults to c6xxvf and 4xxxvf
in both deployment options.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-09-23 10:50:38 +03:00
Mikko Ylinen
da4a9fca96 qat: add note about vfio-pci module parameters
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-11 18:48:43 +02:00
Mikko Ylinen
26d4b6f3a8 qat: fix device ID validation
It looks that for a long time now we have accepted a setup where a valid QAT
device ID is accepted as a QAT device resource even though the device is
not "enabled" via kernelVfDrivers parameter.

Fix device ID validation to skip valid QAT devices that are not
explicitly specified in kernelVfDrivers.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-21 14:33:27 +02:00
Mikko Ylinen
2155a24e73 qat: add new devices and change defaults
The plugin now detects/accepts 4xxx and c4xxx devices too
and defaults to those drivers that are part of Linux mainline.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-17 15:23:00 +02:00
Mikko Ylinen
335ca93d39 qat: add kustomize overlay to enable SR-IOV
This commit adds two initcontainers in a kustomize overlay to QAT
deployment. The overlay can be used to prepare QAT setup on a freshly
booted system.

Note: containerd/cri-o seem to have issues mounting sysfs rw in even
if the container is privileged. Therefore, we do a special /sys:/sys
bind mount for 'cat sriov_totalvs | tee sriov_numvfs' to work.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-15 07:39:25 +03:00
Mikko Ylinen
c8ed2bb798 deployments: qat: add an overlay for Apparmor annotations
Some Ubuntu systems may run with Apparmor LSM policy enformements making
the default QAT daemonset to fail with (un)bind errors.

This commit adds a sample kustomize overlay to deploy the QAT daemonset with
Apparmor uconfined policy.

Fixes: #381

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-06-01 07:50:35 +03:00
Graham Whaley
f8dbc896a1 devicemanager: qat: use klog for logging and debug
Move the framework, and the qat driver, to use `klog`
for logging and debug.

This has a some noticeable effects:

1) Our default log output gains a bunch of annotation:
From:
    QAT device plugin started in 'dpdk' mode
To:
    I0312 11:51:02.057728    6053 qat_plugin.go:64] QAT device plugin started in 'dpdk' mode

(there is now a command line option to drop those annotations if
necessary).

2) We gain a bunch of command line parameters from klog for controlling log
levels and output. We go from 5 arguments to 17:

---
Usage of ./cmd/qat_plugin/qat_plugin:
  -add_dir_header
        If true, adds the file directory to the header
  -alsologtostderr
        log to standard error as well as files
  -debug
        enable debug output
  -dpdk-driver string
        DPDK Device driver for configuring the QAT device (default "vfio-pci")
  -kernel-vf-drivers string
        Comma separated VF Device Driver of the QuickAssist Devices in the system. Devices supported: DH895xCC,C62x,C3xxx and D15xx (default "dh895xccvf,c6xxvf,c3xxxvf,d15xxvf")
  -log_backtrace_at value
        when logging hits line file:N, emit a stack trace
  -log_dir string
        If non-empty, write log files in this directory
  -log_file string
        If non-empty, use this log file
  -log_file_max_size uint
        Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
  -logtostderr
        log to standard error instead of files (default true)
  -max-num-devices int
        maximum number of QAT devices to be provided to the QuickAssist device plugin (default 32)
  -mode string
        plugin mode which can be either dpdk (default) or kernel (default "dpdk")
  -skip_headers
        If true, avoid header prefixes in the log messages
  -skip_log_headers
        If true, avoid headers when opening log files
  -stderrthreshold value
        logs at or above this threshold go to stderr (default 2)
  -v value
        number for the log level verbosity
  -vmodule value
        comma-separated list of pattern=N settings for file-filtered logging
---

3) Our `-debug` flag is now replaced by the `klog` `-v n` flag.

*NOTE:* This is potentially a minor breaking change. Applying
this debug overlay to any previous (pre-klog edit) images will
cause the container to fail to launch, as it will not recognise
the new `-v` arguments.

We also update the kustomize deployment to move from using
DEBUG env vars to adding a VERBOSITY var that controls both
the log verbosity and now the debug mode enabling.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-19 11:20:48 +00:00
Mikko Ylinen
1d41852013 qat: mount VFIO devices for topology hints to work
Previously, /dev/vfio/xx devices were just arbitrary strings and the
plugin did not need the devices for anything. After adding the checks
for topology hints, we need to read the devices attached to those so
the device nodes must be bind mounted in the plugin container.

Moreover, be more verbose about any errors coming from the topology code.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-03-02 08:13:09 +02:00
Antti Kervinen
ec8eef6daa qat_plugin: add kustomizations
- Default deployment: `kubectl apply -k deployments/qat_plugin`
- Debug variant: `kubectl apply -k deployments/qat_plugin/overlays/debug`
- Single-resource `yaml` naming convention:
  applying x-y-z.yaml configures k8s resource named x-y-z.
- QAT plugin README updated.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-02-05 15:48:57 +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
bfcac03e48 deployments: fix QAT plugin command path
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-29 13:21:42 +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
Dmitry Rozhkov
ca569b0f70 qat: initial support for openssl QAT engine 2019-04-25 14:14:09 +03:00
Mikko Ylinen
187f8040f0 qat_plugin: use vfio-pci as the default driver
vfio-pci uses IOMMU memory protection and is a safer default.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-28 10:32:31 +02:00
Mikko Ylinen
00bbe922de qat: deployment: set parameters via ConfigMap
For easier deployments, fetch plugin command line arguments from ConfigMap.
When using ConfigMaps, qat_plugin.yaml needs no changes and can always
be used as is.

qat_plugin_default_configmap.yaml uses built-in defaults.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2018-11-20 13:43:00 +02:00
ssehgal
3eb2b10f75 Enabling support for QuickAssist Devices 2018-07-23 17:35:37 +01:00