eraser icon indicating copy to clipboard operation
eraser copied to clipboard

Implement Virtual Kubelet to Improve Testing

Open pmengelbert opened this issue 3 years ago • 0 comments

Describe the solution you'd like An example of the problem that would be solved is this: Currently, we are modifying nodes in e2e tests in order to test certain behavior. For example, we apply the label eraser.sh/cleanup.skip=true in order to test whether our node skipping mechanism works.

Another solution would be to join a virtual kubelet to the cluster that would act as a node. It would be a noop node that reports all scheduling requests and deletion requests to be successful.

Our virtual kubelet would operate as a minimal GRPC service, exposed as a unix socket in a well-known location, that implements only the CRI calls we find necessary in testing. For example, CRI calls responsible for scheduling of pods, stopping/deletion of containers, and removal of images.

Finally, in our e2e tests, instead of using docker exec <node> ctr ... we would use docker exec <node> crictl... to hook into the CRI interface described above.

Anything else you would like to add: This is fairly involved and lower priority than some other items, but worth tracking here in the event we are able to come back to this later.

Environment:

  • Eraser version: v0.1.0
  • Kubernetes version: N/A

pmengelbert avatar Apr 20 '22 18:04 pmengelbert