@@ -10,6 +10,7 @@ Table of Contents
1010 * [ Work with Intel Device Plugins Operator Modifications] ( #work-with-intel-device-plugins-operator-modifications )
1111 * [ Publish a New Version of the Intel Device Plugins Operator to operatorhub.io] ( #publish-a-new-version-of-the-intel-device-plugins-operator-to-operatorhubio )
1212 * [ Run E2E Tests] ( #run-e2e-tests )
13+ * [ Run Operator E2E Tests] ( #run-operator-e2e-tests )
1314 * [ Run Controller Tests with a Local Control Plane] ( #run-controller-tests-with-a-local-control-plane )
1415* [ How to Develop Simple Device Plugins] ( #how-to-develop-simple-device-plugins )
1516 * [ Logging] ( #logging )
@@ -268,6 +269,99 @@ without a pre-configured Kubernetes cluster. Just make sure you have
268269make test-with-kind
269270```
270271
272+ ### Run Operator E2E Tests
273+
274+ The operator E2E tests (` test/e2e/operator/ ` ) verify that the Intel Device Plugins Operator
275+ correctly deploys each plugin DaemonSet and exposes device resources as allocatable on nodes.
276+ The tests cover QAT (cy, dc), SGX, DSA (idxd, vfio), IAA, and GPU plugins.
277+
278+ The following environment variables must be set before running:
279+
280+ | Variable | Required | Description |
281+ | ---| ---| ---|
282+ | ` PROJECT_NAMESPACE ` | always | Kubernetes namespace where the operator is deployed |
283+ | ` IMAGE_PATH ` | always | Image path under the registry (e.g. ` myproject ` ) |
284+ | ` PLUGIN_VERSION ` | always | Plugin image tag (e.g. ` 0.35.0 ` ) |
285+ | ` IMAGE_REGISTRY ` | K8s only | Container registry address (e.g. ` registry.example.com:5000 ` ); omit on OCP|
286+
287+ #### Vanilla Kubernetes
288+
289+ ** Prerequisites:**
290+
291+ - ` cert-manager ` must already be installed in the cluster (the ` cert-manager ` namespace must exist).
292+ The tests will fail early if it is absent. See the [ cert-manager install guide] ( https://cert-manager.io/docs/installation/ ) .
293+ - Node Feature Discovery (NFD) is deployed automatically by the test suite if no pods are found in the ` node-feature-discovery ` namespace.
294+ - The ` PROJECT_NAMESPACE ` namespace is created automatically if it does not yet exist.
295+ - The operator is deployed from ` deployments/operator/default/kustomization.yaml ` .
296+
297+ ``` bash
298+ export PLUGIN_VERSION=0.35.0
299+ export PROJECT_NAMESPACE=inteldeviceplugin-operator
300+ export IMAGE_PATH=myproject
301+ export IMAGE_REGISTRY=registry.example.com:5000
302+ KUBECONFIG=/path/to/kubeconfig make e2e-operator
303+ ```
304+
305+ Running operator tests with existing container images (0.35.0):
306+ ``` bash
307+ export PLUGIN_VERSION=0.35.0
308+ export PROJECT_NAMESPACE=inteldeviceplugin-operator
309+ export IMAGE_PATH=intel
310+ export IMAGE_REGISTRY=docker.io
311+ KUBECONFIG=/path/to/kubeconfig make e2e-operator
312+ ```
313+
314+ #### OpenShift (OCP)
315+
316+ ** Prerequisites:**
317+
318+ - The OCP service-CA operator is used for TLS; ` cert-manager ` is ** not** required and must not
319+ interfere.
320+ - NFD is expected to already be running, either via the OpenShift NFD Operator
321+ (` openshift-nfd ` namespace) or standard upstream NFD (` node-feature-discovery ` namespace).
322+ The test suite deploys NFD automatically only if neither namespace has running pods.
323+ - The ` PROJECT_NAMESPACE ` namespace ** must exist before running** ; it is not created automatically
324+ on OCP. For OCP internal registry access, ` PROJECT_NAMESPACE ` and ` IMAGE_PATH ` typically refer
325+ to the same OpenShift project.
326+ - Do ** not** set ` IMAGE_REGISTRY ` ; the tests default to the OCP internal registry
327+ (` image-registry.openshift-image-registry.svc:5000 ` ).
328+ - The operator is deployed from ` deployments/operator/overlays/ocp/kustomization.yaml ` .
329+ - Plugin images must be mirrored to the OCP internal registry before running:
330+
331+ ``` bash
332+ # The TAG has to be same or greater than the current release semver
333+ TAG=0.35.1 make set-version dockerfiles mirror-images-ocp
334+ ```
335+
336+ Then run the tests:
337+
338+ ``` bash
339+ export PROJECT_NAMESPACE=inteldeviceplugin-operator
340+ export IMAGE_PATH=inteldeviceplugin-operator
341+ export PLUGIN_VERSION=0.35.1
342+ KUBECONFIG=/path/to/kubeconfig make e2e-operator
343+ ```
344+
345+ #### Filtering Operator Tests
346+
347+ The ` make e2e-operator ` target uses the label filter ` operator && !(gpu || iaa) ` by default.
348+ Use ` --ginkgo.label-filter ` directly when you need a different subset:
349+
350+ ``` bash
351+ # Run only the QAT operator tests
352+ KUBECONFIG=/path/to/kubeconfig go test -v ./test/e2e/... \
353+ -ginkgo.v --ginkgo.label-filter " operator && qat" \
354+ -delete-namespace-on-failure=false
355+
356+ # Run all operator tests including GPU and IAA
357+ KUBECONFIG=/path/to/kubeconfig go test -v ./test/e2e/... \
358+ -ginkgo.v --ginkgo.label-filter " operator" \
359+ -delete-namespace-on-failure=false
360+ ```
361+
362+ Available per-plugin labels: ` qat ` , ` sgx ` , ` dsa ` , ` iaa ` , ` gpu ` .
363+ Focus labels within operator tests: ` cy ` , ` dc ` (QAT), ` idxd ` , ` vfio ` (DSA), ` i915 ` (GPU).
364+
271365### Run Controller Tests with a Local Control Plane
272366
273367The controller-runtime library provides a package for integration testing by
0 commit comments