Skip to content
Snippets Groups Projects
Unverified Commit 3cef18a3 authored by Mario Macias's avatar Mario Macias Committed by GitHub
Browse files

Rename project to netobserv-ebpf-agent (#13)

parent 6b3bf137
No related branches found
No related tags found
No related merge requests found
Showing
with 53 additions and 52 deletions
......@@ -7,7 +7,7 @@ env:
REGISTRY_USER: netobserv+github_ci
REGISTRY_PASSWORD: ${{ secrets.QUAY_SECRET }}
REGISTRY: quay.io/netobserv
IMAGE: netobserv-agent
IMAGE: netobserv-ebpf-agent
IMAGE_ORG: netobserv
TAGS: main
......
......@@ -6,7 +6,7 @@ on:
env:
REGISTRY_USER: netobserv+github_ci
REGISTRY: quay.io/netobserv
IMAGE: netobserv-agent
IMAGE: netobserv-ebpf-agent
IMAGE_ORG: netobserv
jobs:
......
......@@ -30,7 +30,7 @@ RUN make compile
# Create final image from minimal + built binary
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5-240
WORKDIR /
COPY --from=builder /opt/app-root/src/bin/netobserv-agent .
COPY --from=builder /opt/app-root/src/bin/netobserv-ebpf-agent .
USER 65532:65532
ENTRYPOINT ["/netobserv-agent"]
ENTRYPOINT ["/netobserv-ebpf-agent"]
......@@ -13,7 +13,7 @@ IMAGE_ORG ?= $(USER)
# IMAGE_TAG_BASE defines the namespace and part of the image name for remote images.
# This variable is used to construct full image tags for bundle and catalog images.
IMAGE_TAG_BASE ?= quay.io/$(IMAGE_ORG)/netobserv-agent
IMAGE_TAG_BASE ?= quay.io/$(IMAGE_ORG)/netobserv-ebpf-agent
# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(SW_VERSION)
......@@ -87,7 +87,7 @@ build: prereqs fmt lint test vendors compile
.PHONY: compile
compile:
@echo "### Compiling project"
GOOS=$(GOOS) go build -ldflags "-X main.version=${SW_VERSION} -X 'main.buildVersion=${BUILD_VERSION}' -X 'main.buildDate=${BUILD_DATE}'" -mod vendor -a -o bin/netobserv-agent cmd/netobserv-agent.go
GOOS=$(GOOS) go build -ldflags "-X main.version=${SW_VERSION} -X 'main.buildVersion=${BUILD_VERSION}' -X 'main.buildDate=${BUILD_DATE}'" -mod vendor -a -o bin/netobserv-ebpf-agent cmd/netobserv-ebpf-agent.go
.PHONY: test
test:
......
# Network Observability Agent
# Network Observability eBPF Agent
Network Observability Agent
Network Observability eBPF Agent.
## How to compile
......@@ -11,7 +11,7 @@ make build
## How to run
```
sudo bin/netobserv-agent
sudo bin/netobserv-ebpf-agent
```
(Pod deployment will come soon)
......
......@@ -10,7 +10,7 @@ import (
"syscall"
"time"
"github.com/netobserv/netobserv-agent/pkg/agent"
"github.com/netobserv/netobserv-ebpf-agent/pkg/agent"
"github.com/sirupsen/logrus"
)
......@@ -49,7 +49,7 @@ func main() {
CacheActiveTimeout: maxFlowEvictionPeriod,
})
if err != nil {
logrus.WithError(err).Fatal("can't instantiate netobserv-agent")
logrus.WithError(err).Fatal("can't instantiate netobserv-ebpf-agent")
}
logrus.Infof("push CTRL+C or send SIGTERM to interrupt execution")
......@@ -62,6 +62,6 @@ func main() {
canceler()
}()
if err := flowsAgent.Run(ctx); err != nil {
logrus.WithError(err).Fatal("can't start netobserv-agent")
logrus.WithError(err).Fatal("can't start netobserv-ebpf-agent")
}
}
# Deployment example files
This directory contains some example files that show how the netobserv-agent
This directory contains some example files that show how the netobserv-ebpf-agent
can be deployed. In production, the agent is deployed by the Network Observability Operator
but the files contained here are useful for documentation and manual testing.
......
......@@ -3,24 +3,24 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netobserv-agent
name: netobserv-ebpf-agent
labels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
spec:
selector:
matchLabels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
template:
metadata:
labels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
spec:
serviceAccountName: netobserv-account
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: netobserv-agent
image: quay.io/netobserv/netobserv-agent:main
- name: netobserv-ebpf-agent
image: quay.io/netobserv/netobserv-ebpf-agent:main
# imagePullPolicy: Always
securityContext:
privileged: true
......
......@@ -3,24 +3,24 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netobserv-agent
name: netobserv-ebpf-agent
labels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
spec:
selector:
matchLabels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
template:
metadata:
labels:
k8s-app: netobserv-agent
k8s-app: netobserv-ebpf-agent
spec:
serviceAccountName: netobserv-account
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: netobserv-agent
image: quay.io/netobserv/netobserv-agent:main
- name: netobserv-ebpf-agent
image: quay.io/netobserv/netobserv-ebpf-agent:main
# imagePullPolicy: Always
securityContext:
privileged: true
......
......@@ -6,7 +6,7 @@ How to test your setup performance:
$ oc apply -f deployment.yml
$ oc get pods
NAME READY STATUS RESTARTS AGE
netobserv-agent 1/1 Running 0 20s
netobserv-ebpf-agent 1/1 Running 0 20s
packet-counter-7b6df8b766-dbv8d 1/1 Running 0 20s
$ oc logs -f packet-counter-7b6df8b766-dbv8d
```
......
......@@ -38,9 +38,9 @@ spec:
apiVersion: v1
kind: Pod
metadata:
name: netobserv-agent
name: netobserv-ebpf-agent
labels:
run: netobserv-agent
run: netobserv-ebpf-agent
spec:
# the agent must be privileged
hostNetwork: true
......@@ -55,8 +55,8 @@ spec:
run: packet-counter
topologyKey: kubernetes.io/hostname
containers:
- name: netobserv-agent
image: quay.io/netobserv/netobserv-agent:main
- name: netobserv-ebpf-agent
image: quay.io/netobserv/netobserv-ebpf-agent:main
# imagePullPolicy: Always
securityContext:
privileged: true
......
......@@ -40,13 +40,13 @@ spec:
command:
- iperf3
- -s
# colocate with the netobserv-agent to allow it capturing the generated traffic
# colocate with the netobserv-ebpf-agent to allow it capturing the generated traffic
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
run: netobserv-agent
run: netobserv-ebpf-agent
topologyKey: kubernetes.io/hostname
---
apiVersion: apps/v1
......@@ -76,11 +76,11 @@ spec:
- iperf3-server
- -t
- "0"
# colocate outside the netobserv-agent host to bring load outside
# colocate outside the netobserv-ebpf-agent host to bring load outside
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
run: netobserv-agent
run: netobserv-ebpf-agent
topologyKey: kubernetes.io/hostname
......@@ -40,13 +40,13 @@ spec:
command:
- /udpreceiver
- 0.0.0.0:5201
# colocate with the netobserv-agent to allow it capturing the generated traffic
# colocate with the netobserv-ebpf-agent to allow it capturing the generated traffic
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
run: netobserv-agent
run: netobserv-ebpf-agent
topologyKey: kubernetes.io/hostname
---
apiVersion: apps/v1
......@@ -75,11 +75,11 @@ spec:
export HOST=$(getent hosts million-packets-receiver.default.svc.cluster.local | awk '{ print $1 }')
echo \"host: $HOST\"
/udpsender $HOST:5201
# colocate outside the netobserv-agent host to bring load outside
# colocate outside the netobserv-ebpf-agent host to bring load outside
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
run: netobserv-agent
run: netobserv-ebpf-agent
topologyKey: kubernetes.io/hostname
......@@ -5,8 +5,8 @@ import (
"log"
"time"
"github.com/netobserv/netobserv-agent/pkg/grpc"
"github.com/netobserv/netobserv-agent/pkg/pbflow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/grpc"
"github.com/netobserv/netobserv-ebpf-agent/pkg/pbflow"
"github.com/paulbellamy/ratecounter"
)
......
......@@ -4,9 +4,9 @@ import (
"context"
"github.com/netobserv/gopipes/pkg/node"
"github.com/netobserv/netobserv-agent/pkg/ebpf"
"github.com/netobserv/netobserv-agent/pkg/exporter"
"github.com/netobserv/netobserv-agent/pkg/flow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/ebpf"
"github.com/netobserv/netobserv-ebpf-agent/pkg/exporter"
"github.com/netobserv/netobserv-ebpf-agent/pkg/flow"
"github.com/sirupsen/logrus"
)
......
......@@ -7,9 +7,9 @@ import (
"time"
"github.com/mariomac/guara/pkg/test"
"github.com/netobserv/netobserv-agent/pkg/flow"
"github.com/netobserv/netobserv-agent/pkg/grpc"
"github.com/netobserv/netobserv-agent/pkg/pbflow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/flow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/grpc"
"github.com/netobserv/netobserv-ebpf-agent/pkg/pbflow"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
......
......@@ -12,7 +12,7 @@ import (
"github.com/cilium/ebpf/ringbuf"
"github.com/cilium/ebpf/rlimit"
"github.com/netobserv/netobserv-agent/pkg/flow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/flow"
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
)
......@@ -49,6 +49,7 @@ func NewFlowTracer(iface string) *FlowTracer {
func (m *FlowTracer) Register() error {
ilog := log.WithField("iface", m.interfaceName)
// Allow the current process to lock memory for eBPF resources.
// TODO: manually invoke unix.Prlimit with lower/reasonable rlimit
if err := rlimit.RemoveMemlock(); err != nil {
return fmt.Errorf("removing mem lock: %w", err)
}
......
......@@ -6,9 +6,9 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/netobserv/netobserv-agent/pkg/flow"
"github.com/netobserv/netobserv-agent/pkg/grpc"
"github.com/netobserv/netobserv-agent/pkg/pbflow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/flow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/grpc"
"github.com/netobserv/netobserv-ebpf-agent/pkg/pbflow"
)
var glog = logrus.WithField("component", "exporter/GRPCProto")
......
......@@ -2,7 +2,7 @@
package grpc
import (
"github.com/netobserv/netobserv-agent/pkg/pbflow"
"github.com/netobserv/netobserv-ebpf-agent/pkg/pbflow"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment