kubernetes/test/e2e/dra
Patrick Ohly 20d7fa2771 e2e dra: fix resource limits in a mixed cluster
The check for "resources available on a node" must treat nodes that are not
listed as "no resources available". The previous logic only worked because all
nodes were listed during E2E testing. The upcoming integration testing is
covering additional scenarios and triggered this broken case.
2023-02-15 15:12:19 +01:00
..
test-driver e2e dra: fix resource limits in a mixed cluster 2023-02-15 15:12:19 +01:00
deploy.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
dra.go e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
kind-build-image.sh
kind.yaml
OWNERS
README.md

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

The container runtime must support CDI. The latest cri-o releases contain support, containerd 1.6.x does not. To bring up a kind cluster with containerd built from their main branch, use:

test/e2e/dra/kind-build-image.sh dra/node:latest && \
kind create cluster --config test/e2e/dra/kind.yaml --image dra/node:latest