Commit Graph

57 Commits

Author SHA1 Message Date
Jason Culligan
b21152c83f e2e: update testssl.parameters and logging
Added testssl.sh switches to add more tests

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Jason Culligan <jason.culligan@intel.com>
2022-09-01 07:45:22 +03:00
Tuomas Katila
2fb11eccba e2e: Remove unnecessary namespace arguments from KubectlOrDie calls
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2022-08-31 17:09:47 +03:00
Mikko Ylinen
78cbebf20f e2e: fix SGX test flakiness
Due to a regression in k8s.io@v1.25, WaitForPodsWithLabelRunningReady()
ignored user provided timeout and defaulted to 60s. In some cases, NFD
needs more than that to the tests fail.

Workaround the problem by moving to use WaitForPodsRunningReady() with
minPods=2 (nfd-master and at least one nfd-worker).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-23 20:01:01 +03:00
Mikko Ylinen
9130c5e28e DROP: increase e2e-sgx timeout
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-15 13:55:17 +03:00
Mikko Ylinen
50b985dde5 bump go mod version to 1.18 and move to k8s.io v1.25.0-rc.0
the e2e framework in v1.25 also reguires us to move to gingko/v2
so make that change too.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-15 13:54:02 +03:00
Mikko Ylinen
c1056e6b2f fixup: testssl: check SWEET32
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-06-20 21:22:40 +03:00
Mikko Ylinen
f9ca36cc26 set TLSMinVersion for webhook servers
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-06-20 19:04:50 +03:00
Ed Bartosh
7f415f54a1 e2e-dlb: make tests working in Simics
- used different pods for PF and VF workloads
- increased waiting timeout to 200s
- used 'epoll' waiting mode for test apps
- decreased amount of packets from 128 to 8 for test apps
- output pod logs
- done small code optimisations

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-06-17 14:22:33 +03:00
Ed Bartosh
43da11571b Makefile: add e2e-dlb target
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-06-09 20:18:56 +03:00
Oleg Zhurakivskyy
f1ec14d106 iaa: Add e2e tests
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-06-09 15:00:25 +03:00
Oleg Zhurakivskyy
710aaaee23 dsa: Add e2e tests
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-06-01 11:25:12 +03:00
Mikko Ylinen
8d20c62833 e2e: expect test workloads to finish successfully
WaitForFinish waits for pod to finish running, regardless of
success or failure. WaitForSuccess waits for pod to succeed
which is what we expect from our test workloads that try
to use the devices.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-05-19 14:14:11 +03:00
Mikko Ylinen
cbc521e505 move to k8s.io v1.24.0-rc.1
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-04-27 09:26:07 +03:00
Mikko Ylinen
3b857f878a e2e: utils: fix WaitForNodesWithResource timeout
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-04-26 13:55:22 +03: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
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
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
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
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
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
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
Dmitry Rozhkov
7177409f19 fpga webhook: rework deployment to use kustomize
Contributes to #318
2020-06-23 15:53:36 +03:00
Dmitry Rozhkov
70f862f2aa add golangci linter
In this initial commit the following checks are disabled due to
excessive amount of changes required:
- dupl (duplicate code)
- funlen (function length)
- goerr113 (errors handling expressions)
- gomnd (magic numbers)
- gosec (security)
- nakedret (naked returns)
- wsl (forces to use empty lines)
- errcheck (checking for unchecked errors)
- staticcheck (static analysis)
2020-06-08 14:01:13 +03:00
Ed Bartosh
8d6afae23d fpga: update e2e tests to work with mode-less webhook
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2020-04-29 11:59:50 +03:00