Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Dec 12, 2024
1 parent 6c7b8fe commit 4047187
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ make generate

Regularly tested on Fedora.

### Running end-to-end tests

Refer to the specific documentation: [e2e readme](./e2e/README.md)

## Known issues

### Extrenal Traffic in Openshift (OVN-Kubernetes CNI)
Expand Down
42 changes: 42 additions & 0 deletions e2e/README.md
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
```
3 changes: 1 addition & 2 deletions e2e/cluster/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ import (
"os"
"os/signal"
"path"
rt2 "runtime"
"sort"
"syscall"
"testing"
"time"

rt2 "runtime"

"github.com/netobserv/netobserv-ebpf-agent/e2e/cluster/tester"

"github.com/sirupsen/logrus"
Expand Down

0 comments on commit 4047187

Please sign in to comment.