Skip to content
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

Tetragon oci hook setup #1842

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Tetragon oci hook setup #1842

merged 6 commits into from
Dec 12, 2023

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Dec 5, 2023

Add an init container for installing the tetragon OCI hook.
This, currently, only supports cri-o, but it can be extended to support containerd's NRI: https://github.com/containerd/containerd/blob/main/docs/NRI.md.

See for a developer demo: https://github.com/cilium/tetragon/blob/pr/kkourt/tetragon-oci-hook-setup/contrib/rthooks/tetragon-oci-hook/docs/demo.md.

helm: add init container to install tetragon-oci-hook in cri-o setups

@kkourt kkourt requested a review from a team as a code owner December 5, 2023 09:42
@kkourt kkourt requested a review from tixxdz December 5, 2023 09:42
Copy link

netlify bot commented Dec 5, 2023

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 28d751f
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/65731fe22b2ed100079d4b5b
😎 Deploy Preview https://deploy-preview-1842--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kkourt kkourt force-pushed the pr/kkourt/tetragon-oci-hook-setup branch from ed896f2 to 1ef642f Compare December 5, 2023 09:49
@kkourt kkourt requested a review from lambdanis December 5, 2023 09:49
@kkourt kkourt added the release-note/minor This PR introduces a minor user-visible change label Dec 5, 2023
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments re container template.

Also, I caused some conflicts with #1845, sorry :) I essentially moved the Helm chart into tetragon directory, so hopefully they should be straightforward to resolve.

This is a preparation patch for subsequent patches.

Signed-off-by: Kornilios Kourtis <[email protected]>
tetragon-oci-hook-setup is meant to be executed in an init container to
setup run-time hooks on the host. Currently, it only supports the
oci-hooks interface (as, for example, used by cri-o). NRI or other
interfaces fall into future work.

There are two commands: install and uninstall.

Install will copy the hook binary to a directory (which should be a host
mount) and add a configuration file to the hooks directory (also should
be a host mount) to call the binary.

Signed-off-by: Kornilios Kourtis <[email protected]>
Add tetragon-oci-hook and tetragon-oci-hook-setup in the tetragon image.
This will enable us to use it as an init container to setup the OCI
hooks.

Signed-off-by: Kornilios Kourtis <[email protected]>
This patch adds the ociHookSetup helm value to configure the tetragon
oci hook. For now, it is disabled by default.

Signed-off-by: Kornilios Kourtis <[email protected]>
This is mostly for illustration purposes until we find something better.

Signed-off-by: Kornilios Kourtis <[email protected]>
Add a developer demo. We will move this to docuemntation proper once the
PR is merged, and the image is updated.

Signed-off-by: Kornilios Kourtis <[email protected]>
@kkourt kkourt force-pushed the pr/kkourt/tetragon-oci-hook-setup branch from 1ef642f to 28d751f Compare December 8, 2023 13:53
Makefile Show resolved Hide resolved
@kkourt kkourt merged commit 2cdb647 into main Dec 12, 2023
38 checks passed
@kkourt kkourt deleted the pr/kkourt/tetragon-oci-hook-setup branch December 12, 2023 11:44
@kkourt kkourt added release-note/major This PR introduces major new functionality and removed release-note/minor This PR introduces a minor user-visible change labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/major This PR introduces major new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants