Commit Graph

60 Commits

Author SHA1 Message Date
Hyeongju Johannes Lee
8ca5200c43 envtest: add more tests for DaemonSets
Add tests if args, initImage, nodeSelector are set as intended

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-03-10 17:03:33 +02:00
Ed Bartosh
6b27cf1f7c Implement IAA plugin, operator, demo
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-03-04 15:58:42 +02:00
Ed Bartosh
d4966e089c
Merge pull request #857 from ozhuraki/operator-upgrade
operator: Support upgrade of plugins
2022-02-18 17:55:53 +02:00
Oleg Zhurakivskyy
9475b43f55 envtest: Add tests for upgrade
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-02-18 12:52:55 +02:00
Mikko Ylinen
72c4552253 deployments: move SGX NFD config to an NFD kustomize overlay
Start using the newly created NodeFeatureRule configs with SGX.
This allows to drop the custom worker config.

Additionally, split the example NFD deployment into two steps

1) plain NFD (+SGX json patches)
2) NodeFeatureRule creation

NodeFeatureRule creation is not guaranteed to succeed when it's
part of the same kustomization with the CRD creation. Users may
also have NFD already running so allowing 2) alone works better
in that scenario.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-02-18 11:17:57 +02:00
Mikko Ylinen
b01b4c8550 e2e/sgx: increase epc registration check timeout
The NFD worker sleep timout is 60s by default so there are changes
we'll miss getting the sgx.intel.com/epc extended resource registered
before the timeout.

Increase the timeout so that at least two NFD worker labeling rounds
are included.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-01-13 10:51:18 +02:00
Ukri Niemimuukko
5e3f26f25b add device check to gpu e2e test and e2e-gpu makefile target
Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
2022-01-11 17:56:42 +02:00
Eduard Bartosh
f01fb6e8c6 e2e/sgx: refer resources in the error messages
Signed-off-by: Eduard Bartosh <eduard.bartosh@intel.com>
2021-12-23 00:47:11 +02:00
Ed Bartosh
a695a5937f
Merge pull request #818 from mythi/PR-2021-075
e2e: sgx: fix NFD and webhook deployment
2021-12-22 12:18:38 +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
Mikko Ylinen
cdd7ca8376 e2e: split NFD and SGX webhook away from SGX plugin deployment
Previously, the SGX plugin deployment pulled in NFD and
SGX webhook as well. This triggered kustomize issues when
trying to get everything under the same namespace.

This commit splits the three deployments into their own steps.
It allows to keep the static parts part of [Before|After]Each
and helps to build SGX plugin/application test cases more
easily.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-12-22 11:22:14 +02:00
Mikko Ylinen
8784eb057c sgx: fix volumeMounts mutation
The changes made by addVolumeMount() were overriden when the
intermediate container variable was assigned to the pod and
thus the volumeMount changes were lost.

Fix it by making the volumeMount changes to the intermediate
container that is then assigned to the final pod.

Also, make the latest e2e test case to use the
checkMutatedVolumes() helper and fix the illegal Volume
name.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2021-12-21 13:32:50 +02:00
Ismo Puustinen
f6a107a9c1 sgx-webook: add tests for Volume and VolumeMount creation.
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2021-12-20 02:41:30 -08:00
Ed Bartosh
cec004c398 lint: enable wsl check
Fixes: #392

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-12-17 11:48:48 +02:00
Mikko Ylinen
1c3017dd39 e2e: wait longer in DeployWebhook
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-12-09 18:01:33 +02:00
Ed Bartosh
23193879c9
Merge pull request #770 from hj-johannes-lee/e2e-dlb
e2e: add dlb test
2021-12-02 12:51:34 +02:00
Hyeongju Johannes Lee
91e1877180 e2e: add dlb test
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-12-02 01:14:17 -08:00
Ed Bartosh
b1c52850fe
Merge pull request #760 from hj-johannes-lee/envtest
envtest: add DlbDevicePlugin tests
2021-11-29 14:46:03 +02:00
Hyeongju Johannes Lee
f6c3f17549 ci: use 1.22.1 ver of K8s instead of 1.20.2
Update suite_test to support kubernetes 1.21+ version

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-11-26 05:02:09 -08:00
Hyeongju Johannes Lee
66fd91a695 envtest: add DlbDevicePlugin tests
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-11-25 09:23:08 -08:00
Ed Bartosh
c4d5fea228 e2e: run FPGA tests in CI environment
- don't delete deployment as it may not exist
- set restart policy to Never to avoid running the same tests many times

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-11-02 11:52:06 +02:00
Ed Bartosh
cce590ee50 e2e: increase WaitForFinish timeout
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-10-21 09:22:04 +03:00
Ed Bartosh
9360745ae5 e2e: increase WaitForSuccess timeout
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-10-20 11:48:47 +03:00
Ed Bartosh
a6078aa65d e2e: increase WaitForPodsWithLabelRunningReady timeout
Current timeout is too small and causes test failures
in CI environment.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-10-20 11:46:58 +03: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
e5c15e4004 e2e: fix securityContext checks
Unset fields are not 'false' but a nil pointer. Fix the
securityContext checks to take this into account.

Fixes: "e2e: add a test to check that plugins ReadOnlyRootfs is enabled"

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-10-19 14:30:27 +03:00
Ed Bartosh
5af85a785f qat: copy annotations
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-09-22 11:27:24 +03:00
Dmitry Rozhkov
941b19b4aa e2e: fix linter warnings 2021-09-06 10:17:31 +03:00
Dmitry Rozhkov
155ad68801
Merge pull request #682 from mythi/PR-2021-041
e2e improvements
2021-09-03 14:38:00 +03:00
Hyeongju Johannes Lee
4bc70ac544 Add goerr113 linter check
Add goerr113 lintercheck
Fix the usage of fmt.Errorf() by wrapping errors
Fix the usage of errors.New()
2021-09-03 11:02:14 +03:00
Mikko Ylinen
8c6b8ceb69 e2e: add a test to check that plugins ReadOnlyRootfs is enabled
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-08-31 15:20:23 +03:00
Mikko Ylinen
9b687401b8 e2e: add tests for SGX Admission Webhook
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-08-31 15:20:23 +03:00
Mikko Ylinen
b66b217f06 move to k8s.io v1.21.1 and controller-runtime v0.9.0
with the updated controller-runtime, new ginkgo is pulled in and it
warns about a few to-be-deprecated functions. This commit fixes those
too as they were rather small changes.

Smalle delay is added AfterEach() device plugin controller test as
they became flaky after the envtest updates (DaemonSet deletion failed).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-06-09 16:36:05 +03:00
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
Mikko Ylinen
37618d4f85 operator: move deviceplugin/v1 CRDs to cluster scope
The device plugins daemonsets are cluster wide and currently only
one device plugin instance per device is possible so making the
corresponding deviceplugin/v1 CRDs non-namespaced (i.e., scope: cluster)
fits better.

Previously, the device plugin daemonset was deployed in the same
namespace as the CR for that device but with the cluster scoped CRDs
we default to use the same namespace as the operator, unless overridden
via DEVICEPLUGIN_NAMESPACE env variable or a command line parameter
to operator manager deployment.

Three additional changes in this commit:
- enable DSA envtest tests
- update controller-runtime to v0.8.1
- change device plugin envtest suite to use klog/v2

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-02-11 11:41:47 +02:00
Ed Bartosh
884f8e3dfe operator: add DSA support
Fixes: #443

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-02-09 02:13:27 +02:00
Dmitry Shmulevich
3c3a3d1145 added implementation of EPC extended resource advertiser
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-02-04 17:35:17 -08:00
Mikko Ylinen
0892a34705 move to k8s.io v1.20.x and klog/v2 v2.4.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-21 15:34:39 +02:00
Dmitry Rozhkov
5f0da56045 Upgrade to k8s v1.19.3 2020-11-10 16:09:20 +02:00
Mikko Ylinen
161298190f sgx: make SGX NFD kustomization overlay independent
With the addition of SGX webhook in the operator, full SGX stack
depends on having the operator deployed first. SgxDevicePlugin CRD
is set to get intel-sgx-plugin and intel-sgx-initcontainer deployed
by the operator.

As a pre-requisite, node-feature-discovery must be deployed but it
is currently deployed via sgx_plugin kustomization overlay only.

It's better to allow NFD with the SGX specific settings deployed with
a kustomization of its own.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-10-23 12:44:36 +03:00
Mikko Ylinen
883775c973 SGX: add basic e2e tests
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-21 13:19:52 +03:00
Mikko Ylinen
33a4f8f546 sgx: add SgxDevicePlugin CRD and admission webhook
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-10 15:31:26 +03:00
Dmitry Rozhkov
be713f1c8b lint: enable errcheck 2020-08-28 16:14:14 +03:00
Dmitry Rozhkov
200e2f8181 operator: add simple FPGA operator combined with FPGA webhook 2020-08-18 17:32:23 +03:00
Ed Bartosh
4794072273
Merge pull request #422 from rojkov/fpga-kubebuilder
fpga webhook: reimplement to use kubebuilder framework
2020-08-18 13:31:31 +03:00
Dmitry Rozhkov
a62c6f7d5e fpga webhook: reimplement to use kubebuilder framework
Simplify upgrade procedure to newer versions of kubernetes by relying on the
kubebuilder framework rather than using codegen directly.

Closes #377
2020-08-17 12:09:03 +03:00
Ed Bartosh
49d3514e46 e2e: fix FPGA tests
Fixes: #419
2020-07-02 23:12:34 +03:00
Dmitry Rozhkov
e87d94d4fb fpga: finalize plugin kustomization
closes #318
2020-07-01 11:57:45 +03:00
Mikko Ylinen
2f16509fe3
Merge pull request #376 from rojkov/operator-v3
operator: initial version with gpu and qat controllers
2020-06-25 15:49:49 +03:00
Dmitry Rozhkov
6b2fa0a264 operator: initial version with gpu and qat controllers 2020-06-25 13:48:41 +03:00