-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(decl): add support for running tests in containers #244
feat(decl): add support for running tests in containers #244
Conversation
Add container context fields documentation and the env field. Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Enhance process labels propagation system to propagate container image and name information. Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
Omit default process injection if the test must be run inside a container, since spawning a container already involves a process creation. Signed-off-by: Leonardo Di Giovanna <[email protected]> Co-authored-by: Aldo Lacuku <[email protected]>
a272d85
to
d70a938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
LGTM label has been added. Git tree hash: ef2da231263894559d557a85fa26e59d6e2f4dca
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ekoops, FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
723aaff
into
falcosecurity:declarative-testing
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area pkg
What this PR does / why we need it:
This PR adds support for running tests inside containers.
At the moment the containers handling is done by leveraging the containerd API.
If the user specifies that want to run a test inside a container, the test process chain is built inside the container. The
event-generator
image is used to instantiate containers. If the user specifies a different image name from the base one, the base one is tagged with the provided name. The user can also specify a custom container name and/or additional environment variables to provide to the container.Besides the root process, using a container for testing always means adding 1 process to the process chain: for this reason, in case no other processes are specified in the process chain, we avoid to add the default process.
In order to use
useradd
anduserdel
inside the event-generator container, the base image Dockerfile has been updated to use debian-based slim images.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: