Commit Graph

224 Commits

Author SHA1 Message Date
Tuomas Katila
393f0ca73f images: set 0.30.0 tag for the release
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-05-14 13:29:10 +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
Tuomas Katila
aaa15bc55b operator: bump version number to 0.28.0
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-10-23 10:56:14 +03:00
Hyeongju Johannes Lee
20caa42e7a operator: add ctx to func UpgradeImages and logger for env vars of images
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-09-18 12:04:32 -07:00
Hyeongju Johannes Lee
6a60c745d2 operator: add image upgrade with env vars
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-09-18 11:45:52 -07:00
Tuomas Katila
88ae7c83eb sgx & gpu crds: improve comments and note sgx's initimage replacement with NFD rules
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
Co-authored-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-09-15 16:06:02 +03:00
Tuomas Katila
691dfc3483 gpu: refactor nfdhook functionality to plugin
NFD v0.14+ doesn't support binary NFD hooks by default, so there is
a need to move the label creation away from the GPU nfdhook.

Move extended resource label creation to plugin, and drop labels that were
already marked deprecated (platform_gen, media_version etc.).

Drop init-container from deployment files and operator. It is still possible
to use an initcontainer, but the default deployments do not support it.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-09-12 16:20:33 +03:00
Mikko Ylinen
1c209ab404 ci: update golangi-lint to v1.54.2
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-09-05 15:37:23 +03:00
Mikko Ylinen
69f5ccfe66 operator: update controller-gen to v0.13.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-09-05 14:30:10 +03:00
Mikko Ylinen
c3a3561cb8 webhooks: stop handling Pod updates
FPGA and SGX webhooks mutate container resources which
are immutable. Therefore, stop processing pod updates
and act on creation only.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-08-14 15:18:51 +03:00
Tuomas Katila
8f047c3c06 reconciler: fix incomplete log output
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-02 12:07:09 +03:00
Manish Regmi
c3259ee22f Add SELinux Labels for DSA and IAA
Proper SELinux labels are required for the plugins to run in SELinux
enabled clusters like openshift. These labels are custom made for
plugins and are part of container-selinux package.

Signed-off-by: Manish Regmi <manish.regmi@intel.com>
2023-07-20 16:02:08 -04:00
Mikko Ylinen
89986b9972
Merge pull request #1477 from hj-johannes-lee/PR-2023-023
Makefile: update versions & FPGA: fix naked return error from linter
2023-07-20 18:33:57 +03:00
Hyeongju Johannes Lee
c60a3afb26 fpga: fix naked return error from linter
golangci-lint version < v1.53.0 used nakedret linter that did not check
return values in conditionals. That got changed in v1.53.0 and some
of our code starts failing because of naked returns from conditionals.

Update the code to get nakedret linter passing.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-07-20 10:17:08 +03:00
Mikko Ylinen
34baf982b8 operator: add missing IaaDevicePlugin finalizers RBAC
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-07-18 08:25:19 +03:00
Tuomas Katila
4a448f6cbc operator: update to 0.27.0 images
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-06-02 14:00:08 +03:00
Mikko Ylinen
52d3d4abd1 operator: fix setting QAT provisioning config volumeMount
setInitContainer() adds "init-sriov-numvfs" to initContainers
but uses initcontainerName constant to search where to add
the QAT configMap volumeMount. Fix by moving all code to use
the const.

It was also noticed in the controller logs that setting Pod
Volumes is not idempotent but broken DaemonSet gets created:

""intel-device-plugins-manager: Reconciler error "err="DaemonSet.apps
\"intel-qat-plugin\" is invalid: spec.template.spec.volumes[6].name:
Duplicate value: \"qat-config\"" controller="qatdeviceplugin"
controllerGroup="deviceplugin.intel.com"

Finally, change 'qat-config' to 'intel-qat-config-volume' to
better describe that it's a volume.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-05-25 06:43:18 +03:00
Mikko Ylinen
42d47b9a81 go.mod: update to sigs.k8s.io/controller-runtime v0.15.0-beta.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-05-19 07:42:21 +03:00
Mikko Ylinen
e428cd6c19 go.mod: update to k8s 1.27.1 and controller runtime 0.15.x
k8s 1.27.x triggers build errors on controller-runtime 0.14.x
so we will need to update to 0.15.x at the same time.

Changes include:

* k8s e2e framework moved to use Ginkgo context so we add
  test context to all our test nodes.
* adapt Ginkgo parameter modifications.
* adapt SGX admissionwebhook to InjectDecoder removal.
* adapt deviceplugins and FPGA CRDs to controller-runtime
  API changes.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-05-09 14:49:24 +03:00
Tuomas Katila
342554c666 lint fixes found from 0.26.1 release preparation
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-05-02 13:52:36 +03:00
Hyeongju Lee
ed08d11aa3
Merge pull request #1392 from mythi/PR-2023-019
sgx: stop using local source hooks for EPC registration
2023-05-02 12:26:12 +03:00
Mikko Ylinen
3a4c0e574f sgx: stop using local source hooks for EPC registration
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-04-28 14:59:41 +03:00
Mikko Ylinen
5bab034e47 operator: accept image SHA digests
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-04-28 14:59:21 +03:00
Tuomas Katila
974829ff7c gpu: try to fetch PodList from kubelet API
In large clusters and with resource management, the load
from gpu-plugins can become heavy for the api-server.
This change will start fetching pod listings from kubelet
and use api-server as a backup. Any other error than timeout
will also move the logic back to using api-server.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-03-30 12:43:02 +03:00
Mikko Ylinen
934c00f5fc qat: add support for QAT 402xx
Based on
https://lore.kernel.org/linux-crypto/20230303165650.81405-1-damian.muszynski@intel.com/

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-03-09 15:06:30 +02:00
Mikko Ylinen
4fa7c4cb23 pkg/deviceplugin: do not reset Envs/Annotations from previous loops
When more than one device ID is Allocate()'d to a container,
Envs/Annotations for all but the last device ID get lost because
their cresp.* maps are (re-)instantiated on each loop.

Fix it by doing that only once.

Fixes: 55f3e17

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-03-01 09:43:46 +02:00
Mikko Ylinen
f559d8717d
Merge pull request #1327 from eero-t/nfd-features
Use more generic name for NFD features host directory volume
2023-02-13 11:45:26 +02:00
Eero Tamminen
2f3dc23651 Use more generic name for NFD features host directory volume
NFD hooks are deprecated and going away:
https://github.com/kubernetes-sigs/node-feature-discovery/issues/856

This makes the mount names more future-proof, and shows where later
changes need to be done (to change operator mount directory, and
switch hook-using deployments e.g. to feature files).

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2023-02-08 18:20:41 +02:00
Mikko Ylinen
c65d4ab896 operator: update to 0.26.0 images
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-01-20 11:49:51 +02:00