kubernetes/test/e2e/dra
Kubernetes Prow Robot ab78ad32d1
Merge pull request #136194 from bart0sh/PR216-add-signode-approvers-to-dra-owners
add SIG-Node approvers to DRA dirs
2026-01-27 20:15:52 +05:30
..
test-driver Merge pull request #133335 from bart0sh/PR190-pluginmanager-fix-handling-registration-failures 2026-01-23 23:35:29 +05:30
utils DRA tests: stop using deprecated ktesting functions 2026-01-19 08:27:15 +01:00
deploy_device_plugin.go DRA: e2e: test extended resources after device plugin uninstall 2025-10-27 16:24:35 +02:00
dra.go Remove redundant re-assignments in for-loops in test/{e2e,integration,utils} 2026-01-25 22:58:27 +01:00
kind.yaml DRA: log more information 2025-12-16 09:58:05 +01:00
OWNERS add SIG-Node approvers to DRA dirs 2026-01-13 11:52:29 +02:00
README.md Make golang::setup-env turn on workspaces 2024-02-29 22:07:42 -08:00

Overview

The tests in this directory cover dynamic resource allocation support in Kubernetes. They do not test the correct behavior of arbitrary dynamic resource allocation drivers.

If such a driver is needed, then the in-tree test/e2e/dra/test-driver is used, with a slight twist: instead of deploying that driver directly in the cluster, the necessary sockets for interaction with kubelet (registration and dynamic resource allocation) get proxied into the e2e.test binary. This reuses the work done for CSI mock testing. The advantage is that no separate images are needed for the test driver and that the e2e test has full control over all gRPC calls, in case that it needs that for operations like error injection or checking calls.

Cluster setup preparation

The container runtime must support CDI. CRI-O supports CDI starting from release 1.23, Containerd supports CDI starting from release 1.7. To bring up a Kind cluster with Containerd, two things are needed:

NB: Kind switched to use worker-node base image with Containerd 1.7 by default starting from release 0.20, build kind from latest main branch sources or use Kind release binary 0.20 or later.

Build kind node image

After building Kubernetes, in Kubernetes source code tree build new node image:

$ kind build node-image --image dra/node:latest $(pwd)

Bring up a Kind cluster

$ kind create cluster --config test/e2e/dra/kind.yaml --image dra/node:latest

Run tests

  • Build ginkgo
$ make ginkgo
  • Run e2e tests for the Dynamic Resource Allocation feature:
$ KUBECONFIG=~/.kube/config _output/bin/ginkgo -p -v -focus=Feature:DynamicResourceAllocation ./test/e2e