-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #462 from SchSeba/support_virtual_cluster
virtual cluster e2e tests changes
- Loading branch information
Showing
13 changed files
with
770 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: sriov-operator-test | ||
on: [pull_request] | ||
|
||
jobs: | ||
virtual-k8s-cluster: | ||
name: k8s | ||
runs-on: [sriov] | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: run test | ||
run: make test-e2e-conformance-virtual-k8s-cluster-ci | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: artifact | ||
path: ./artifacts.tar.gz | ||
|
||
virtual-ocp: | ||
name: ocp | ||
runs-on: [ ocp ] | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
|
||
- name: run test | ||
run: make test-e2e-conformance-virtual-ocp-cluster-ci | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: artifact | ||
path: ./artifacts.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## E2E conformance test | ||
|
||
It's possible to use QEMU to test the SR-IOV operator on a virtual kubernetes/openshift cluster. | ||
Using the IGB model network driver allow to create virtual functions on the virtual system | ||
|
||
## How to test | ||
|
||
First you will need to enable the `DEV_MODE` via the operator environment variable. | ||
Second step is to add the intel virtual nic to the supported nics configmap. | ||
|
||
Another requirement is to load the vfio kernel module with no_iommu configuration. Example systemd: | ||
|
||
``` | ||
[Unit] | ||
Description=vfio no-iommu | ||
Before=kubelet.service crio.service node-valid-hostname.service | ||
[Service] | ||
# Need oneshot to delay kubelet | ||
Type=oneshot | ||
ExecStart=/usr/bin/bash -c "modprobe vfio enable_unsafe_noiommu_mode=1" | ||
StandardOutput=journal+console | ||
StandardError=journal+console | ||
[Install] | ||
WantedBy=network-online.target | ||
``` | ||
|
||
### Prerequisites | ||
* kcli - deployment tool (https://github.com/karmab/kcli) | ||
* virsh | ||
* qemu > 8.1 | ||
* libvirt > 9 | ||
* podman | ||
* make | ||
* go | ||
|
||
## Deploy the cluster | ||
|
||
use the deployment [script](../hack/run-e2e-conformance-virtual-cluster.sh), this will deploy a k8s cluster | ||
compile the operator images and run the e2e tests. | ||
|
||
example: | ||
``` | ||
SKIP_DELETE=TRUE make test-e2e-conformance-virtual-k8s-cluster | ||
``` | ||
|
||
It's also possible to skip the tests and only deploy the cluster running | ||
|
||
``` | ||
SKIP_TEST=TRUE SKIP_DELETE=TRUE make test-e2e-conformance-virtual-k8s-cluster | ||
``` | ||
|
||
To use the cluster after the deployment you need to export the kubeconfig | ||
|
||
``` | ||
export KUBECONFIG=$HOME/.kcli/clusters/virtual/auth/kubeconfig | ||
``` |
Oops, something went wrong.