Commit Graph

251 Commits

Author SHA1 Message Date
Tuomas Katila
2cbc3d55dd operator: update images to 0.32.0
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2025-01-30 09:56:49 +02:00
Mikko Ylinen
fe3eaeeb0b qat: drop AppArmor annotations
"unconfined" annotation was needed to get writes to new_id / bind
to succeed on AppArmor enabled OSes.

However, many things have changed:

* new_id should not be used anymore and it was dropped in the plugin.
* QAT initcontainer has assumed the role of HW initialization.
* vfio-pci is the preferred "dpdkDriver" and starting with QAT Gen4, it
is the only available VF driver so unbind isn't necessary.
* k8s AppArmor is "GA" since 1.30 and the annotation is deprecated.

As of now, the initcontainer will take care of binding QAT VFs to vfio-pci
so the plugin does not neeed to set AppArmor at all.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-01-16 13:54:37 +02:00
Tuomas Katila
74006cda80 depl: drop capabilities from all plugins
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2025-01-02 15:42:32 +02:00
Mikko Ylinen
c30e80bf86 operator: rework webhooks
controller-runtime has deprecated webhook.Defaulter/Validator and they
will be removed in the next controller-runtime release.

Move deviceplugin webhooks to use admission.CustomDefaulter/Validator.
Common defaulter/validator types can serve all the plugins with only
plugin specific data initialized.

As part of the rework, move away from (the unmaintained) pkg/errors
to errors in Go standard library.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-11-20 11:23:40 +02:00
Tuomas Katila
8e6b3be00a update main with 0.31.1 release changes
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-10-18 10:38:22 +03:00
Hyeongju Johannes Lee
6915c7d162 operator: add sha256 image upgrade test cases in the unit test
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-10-14 05:37:02 -07:00
Hyeongju Johannes Lee
f4241b8cb2 operator: fix upgradeImages
Operatorhub bundle can have sha256 image tags that are put through
env vars. When operator controller manager gets upgraded, its
operands (plugin daemonsets) should be updated to the image in the
env vars. But it has not been working properly because of wrong
parsing.

Fix it to parse the image names that have sha256 tags correctly so
env vars in operator can be used as intended.

Additionatlly, add comments with an example result to the part
where parsing, trimming, or transforming the name of images happens
in UpgradImages to make the process intuitive.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-10-14 05:37:02 -07:00
Tuomas Katila
beac9a3d16 operator: update images to 0.31.0
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-30 13:25:37 +03:00
Hyeongju Johannes Lee
3b08a9074d Add cpu/memory requests and limits
Operator maturity level 3 requires cpu/memory requests and limits
for operands. Add them to all plugins deployed by operator

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-09-25 03:42:19 -07:00
Tuomas Katila
2d9ba91bf1 cdi: add error print for spec write fails
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-13 11:23:40 +03:00
Tuomas Katila
402fb8d9cd gpu: add support for CDI devices
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-11 09:29:55 +03:00
Tuomas Katila
c3a01b91ff cdi: restructure cdi support for more generic use
Pass the whole cdi.spec structure to DeviceInfo and use
cdiCache for interacting with the CDI files on the host.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-09-04 13:56:22 +03:00
Tuomas Katila
fa6d027b24 Fix some lint errors
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-08-27 11:40:29 +03:00
Hyeongju Johannes Lee
ba9b012ab1 sgx: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:55:26 +03:00
Hyeongju Johannes Lee
94833289d5 iaa: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:55:08 +03:00
Hyeongju Johannes Lee
83aa236e70 gpu: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:54:30 +03:00
Hyeongju Johannes Lee
c7ef05fe28 fpga: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:53:56 +03:00
Hyeongju Johannes Lee
c04224746d dsa: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:53:35 +03:00
Hyeongju Johannes Lee
0d12bf453d dlb: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:53:13 +03:00
Hyeongju Johannes Lee
31f3951682 qat: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:42:07 +03:00
John Stamelos
c7d41a96dd fpga: add subsystem vendor & device fields to PCIDevice 2024-06-27 15:21:04 +01:00
Tuomas Katila
20b7b5a4d7
Merge pull request #1748 from mythi/PR-2024-013
pkg/deviceplugin: move to grpc.NewClient()
2024-05-28 12:09:22 +03:00
Tuomas Katila
11c9753aca
Merge pull request #1745 from bart0sh/PR155-fpga-support-CDI
FPGA: support CDI
2024-05-28 11:19:58 +03:00
Mikko Ylinen
4d858c5364 pkg/deviceplugin: move to grpc.NewClient()
grpc.NewClient(), added in grpc-go v1.63, is the preferred way to
create a new ClientConn. In most of our usages, moving away from
grpc.Dial*() to it is straightforward.

However, we've also relied on grpc.Dial*()'s behavior to automatically
make a new connection to "test" a connection is successful isn't available
anymore. Combined with grpc.WithBlock dialoption this usage is considered
"especially bad" way to handle a client connection.

The recommended approach to test a server connection is to separately
make a connection and watch the connection state to become Ready. This
change follows that recommendation.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-05-28 08:17:06 +03:00
Ed Bartosh
8eac8b5edd fpga: remove generation of the CRI-O hook 2024-05-22 14:57:03 +03:00
Ed Bartosh
992fdc6a6c deviceplugin: generate CDI devices 2024-05-22 13:34:23 +03:00
Ed Bartosh
988fbed528 deviceplugin: add DeviceInfo.hooks field 2024-05-22 13:13:38 +03:00
Tuomas Katila
cd8a911c08 operator: update images to 0.30.0
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-05-15 11:26:47 +03:00
dependabot[bot]
25c03a7635 build(deps): bump sigs.k8s.io/controller-runtime from 0.18.1 to 0.18.2
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.18.1 to 0.18.2.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.18.1...v0.18.2)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-08 08:14:05 +03:00
Tuomas Katila
ff91a97934
Merge pull request #1720 from mythi/PR-2024-010
ci: move to golangci-lint v1.57.2
2024-05-03 12:55:29 +03:00
Tuomas Katila
05bb8ef156 qat: add support for 420xx driver and its devices (4946)
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-05-02 11:36:13 +03:00
Mikko Ylinen
54f9d730e9 ci: move to golangci-lint v1.57.2
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-05-02 09:18:27 +03:00
Tuomas Katila
52be7ed1e9 Add tolerations support to operator and plugin CRDs
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-03-20 10:00:41 +02:00
Mikko Ylinen
2399794ef8 webhooks: make SGX mutator registration to follow other webhooks
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-03-05 17:38:26 +02:00
Mikko Ylinen
e673ca9221
Merge pull request #1643 from eliaskoromilas/main
FPGA: Drop OpenCL UUID bitstream validation
2024-01-12 06:56:15 +02:00
Elias Koromilas
18531bd584 FPGA: Drop OpenCL UUID bitstream validation
Signed-off-by: Elias Koromilas <elias.koromilas@gmail.com>
2024-01-10 14:43:44 -05:00
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
Manish Regmi
0256a91643 privileged is not needed for openshift
Remove the privileged section as it is not needed for openshift.

Signed-off-by: Manish Regmi <manish.regmi@intel.com>
2024-01-03 12:34:43 -05:00
Tuomas Katila
ed9189435c operator: update images to 0.29.0
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-12-20 14:39:13 +02:00
Tuomas Katila
df83e1bb7c fpga: fix codeql issues
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-12-05 16:13:37 +02:00
Mikko Ylinen
8f28a7b836 fpga: fix integer type conversion error reported by CodeQL
to address:
"Incorrect conversion of an unsigned 32-bit integer from to a lower bit
size type int without an upper bound check."

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-12-04 14:41:17 +02:00
Mikko Ylinen
d7997800a9 logging: move away from klogr to ktesting/textlogger
klog has added ktesting/textlogger and is going to deprecate
klogr. The deprecation is going to trigger golangci-lint (staticcheck)
errors so rework the logging and move to ktesting/textlogger.

The commit also fixes the loglevel setting with operator.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-20 09:46:41 +02:00
Tuomas Katila
4e06690063 operator: gpu: prevent scenario where CRs both enable and disable resource management
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-11-10 12:31:24 +02:00
Tuomas Katila
6d9e96856d operator: modify service accounts and role bindings to be shared
Additional objects are shared between device plugin CRs. Once the last
CR is removed, the additional objects are also removed.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-11-10 12:31:19 +02:00
Tuomas Katila
f9221c46fd operator: remove one-cr-per-kind limitation
Differentiate objects by adding cr names as suffixes
Drop kind book keeping and related functions from controllers

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-11-09 13:05:40 +02:00
Mikko Ylinen
f208a74f85 fpga/bitstream: use consts as much as possible
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-04 09:04:28 +02:00
Mikko Ylinen
48fd7b82fe controllers: use const appLabel in tests
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-10-30 13:43:18 +02:00
Mikko Ylinen
622a7783f5 webhooks: update sgx device node paths
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-10-30 10:45:05 +02:00
Tuomas Katila
f439c2fd6b operator: dsa & iaa: use const names
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-10-23 11:32:31 +03:00
Tuomas Katila
a15c84c81e operator: fix controllers indicating changes when there are none
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-10-23 11:03:14 +03:00