-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## eBPF Agent e2e tests | ||
|
||
e2e tests can be run with: | ||
|
||
```bash | ||
make tests-e2e | ||
``` | ||
|
||
If you use podman, you may need to run it as root instead: | ||
|
||
```bash | ||
sudo make tests-e2e | ||
``` | ||
|
||
### What it does | ||
|
||
It builds an image with the current code, including pre-generated BPF bytecode, starts a KIND cluster and deploys the agent on it. It also deploys a typical NetObserv stack, that includes flowlogs-pipeline, Loki and/or Kafka. | ||
|
||
It then runs a couple of smoke tests on that cluster, such as testing sending pings between pods and verifying that the expected flows are created. | ||
|
||
The tests leverage Kube's [e2e-framework](https://github.com/kubernetes-sigs/e2e-framework). They are based on manifest files that you can find in [this directory](./cluster/base/). | ||
|
||
### How to troubleshoot | ||
|
||
During the tests, you can run any `kubectl` command to the KIND cluster. | ||
|
||
If you use podman/root and don't want to open a root session you can simply copy the root kube config: | ||
|
||
```bash | ||
sudo cp /root/.kube/config /tmp/agent-kind-kubeconfig | ||
sudo -E chown $USER:$USER /tmp/agent-kind-kubeconfig | ||
export KUBECONFIG=/tmp/agent-kind-kubeconfig | ||
``` | ||
|
||
Then: | ||
|
||
```bash | ||
$ kubectl get pods | ||
NAME READY STATUS RESTARTS AGE | ||
flp-29bmd 1/1 Running 0 6s | ||
loki-7c98dfd6d4-c8q9m 1/1 Running 0 56s | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters