The nightly containerd binary no longer works in the current kind base images: May 15 16:32:31 kind-worker containerd[222]: /usr/local/bin/containerd: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /usr/local/bin/containerd) kind now builds containerd directly with the base images. The official base images still use containerd 1.6, so we have to use a special base image that was prepared for this purpose. Because the containerd config can be patched through kind, we don't need to modify the generated node image anymore.
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:
-
Build node image
$ test/e2e/dra/kind-build-image.sh dra/node:latest
- Bring up a kind cluster
$ kind create cluster --config test/e2e/dra/kind.yaml --image dra/node:latest
Run tests
- Build ginkgo
NB: If you are using go workspace you must disable it
GOWORK=off make gingko
$ make gingko
- Run e2e tests for the
Dynamic Resource Allocationfeature:
$ KUBECONFIG=~/.kube/config _output/bin/ginkgo -p -v -focus=Feature:DynamicResourceAllocation ./test/e2e