Skip to content

tests/e2e: introduce rthooks e2e test#4937

Open
3u13r wants to merge 5 commits into
cilium:mainfrom
3u13r:pr/3u13r/rthook-e2e-test
Open

tests/e2e: introduce rthooks e2e test#4937
3u13r wants to merge 5 commits into
cilium:mainfrom
3u13r:pr/3u13r/rthook-e2e-test

Conversation

@3u13r
Copy link
Copy Markdown
Contributor

@3u13r 3u13r commented Apr 30, 2026

Description

We recently regressed in the integration between the rthooks and Tetragon agent (see here).
This PR replaces the existing rthook test, that didn't cover the integration between hook and agent, with a new e2e test. As the replaced test, this e2e test runs inside minikube.

In an effort to make this error more debuggable, this PR also adds a log container to the rthooks daemonset that tails the logfile of the hook binary.

@3u13r 3u13r force-pushed the pr/3u13r/rthook-e2e-test branch from d5ebc6b to 07e0032 Compare April 30, 2026 16:58
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 30, 2026

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 07e0032
🔍 Latest deploy log https://app.netlify.com/projects/tetragon/deploys/69f38a3ae3c8830008bcce00
😎 Deploy Preview https://deploy-preview-4937--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 project configuration.

@3u13r 3u13r force-pushed the pr/3u13r/rthook-e2e-test branch from 07e0032 to a295917 Compare April 30, 2026 17:08
@3u13r
Copy link
Copy Markdown
Contributor Author

3u13r commented Apr 30, 2026

Still a draft because I first want to make sure the tests pass and I want to do a first review myself with semi-fresh eyes. Done.

The new CI pipeline is here.

The rthook e2e test can only be run in minikube. Therefore, we skip it when we don't detect the -minikube flag. This leads to superfluous CI runs like this.

A solution I came up with is to change the folder structure so that we have e2e/minikube/... and e2e/kind/... targets to pass via E2E_TESTS.
The other solution is to just switch all e2e test to use minikube.
Do you have a preference?

3u13r added 5 commits May 5, 2026 03:56
To make booth troubleshooting and e2e testing easier, expose the rthooks
logs in the daemonset that installs the hooks.

Signed-off-by: Leonard Cohnen <leonard.cohnen@gmail.com>
The agent exposes its gRPC server on a UNIX domain socket (UDS) by default.
We had to override this for the e2e tests, since the test binary needs
to talk to this server. It uses Kubernetes port forwarding features
to expose ports from various pods.

Since UDSs cannot be natively forwarded, the e2e test
adds a daemonset that mounts the UDS and exposes it via a port again.
Then we forward that port again via the port forwarding mechanism.

Signed-off-by: Leonard Cohnen <leonard.cohnen@gmail.com>
The existing rthook testing in tetragon-rthook-pr.yaml has the drawback
that it doesn't test the integration with the tetragon agent.

This integration recently broke, so we want a CI test that checks that
we don't regress again.

Signed-off-by: Leonard Cohnen <leonard.cohnen@gmail.com>
Testing rthooks doesn't seem to (easily) work in KinD. Therefore,
we used to have bash scripts which setup a minikube test environment and
tested only the rthooks without Tetragon installed in the cluster.

Remove this bash script test in favor of a more holistic e2e test.

Note that we stop testing the kins-hook-setup.sh script for containerd
versions <2.0.

This should be fine as the last containerd versions <2.0 will be EOL
Sep 2026, see
https://containerd.io/releases/#current-state-of-containerd-releases.
Moreover, the script assumes a demo single-node KinD setup and is
therefore not relevant to production.

Signed-off-by: Leonard Cohnen <leonard.cohnen@gmail.com>
Signed-off-by: Leonard Cohnen <leonard.cohnen@gmail.com>
@3u13r 3u13r force-pushed the pr/3u13r/rthook-e2e-test branch from a295917 to b14a20d Compare May 5, 2026 01:57
@3u13r 3u13r marked this pull request as ready for review May 5, 2026 02:41
@3u13r 3u13r requested review from a team and will-isovalent as code owners May 5, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant