GoogleContainerTools / GoogleContainerTools/container-structure-test

Kubernetes driver for command tests

Open
#311 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.5k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

Related to #270 , it would be extremely convenient to be able to use a Kubernetes native driver to run both image content tests (the currently supported test types using `--driver tar`) as well as command tests that could run as pods against an image-under-test.

This is an oversimplification but at a HL, a new driver of type `kubernetes` is created which can use an existing user's KUBECONFIG context and executes `kubectl run cst-pod-randomid --image=image-under-test --command -- ` for each command test indicated. Instead of inspecting the Docker/containerd socket for completion status, verify pod status, exit code, etc.

There are some obvious edge cases such as running pods in a secure environment (gVisor, Openshift, clusters with PodSecurityContext, etc) that may prevent this outright. But I'd still like to entertain the idea for those in shared environments that may not have access to a Docker/containerd host directly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.