netobserv / netobserv-ebpf-agent

Network Observability eBPF Agent
Apache License 2.0
116 stars 29 forks source link

NETOBSERV-1471 gRPC export for packet capture #291

Closed jpinsonneau closed 3 months ago

jpinsonneau commented 4 months ago

Description

Add gRPC export capability for packet capture. Since I moved flow grpc to flowgrpc package, we will need to update FLP at the same time

I also took the opportunity to reuse the target host / port from flow config since it doesn't make sense to have both here.

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 38.57143% with 172 lines in your changes are missing coverage. Please review.

Project coverage is 34.04%. Comparing base (6e00a92) to head (df212a7).

Files Patch % Lines
pkg/exporter/grpc_packets.go 0.00% 49 Missing :warning:
pkg/pbpacket/packet.pb.go 52.08% 44 Missing and 2 partials :warning:
pkg/exporter/packets_proto.go 0.00% 21 Missing :warning:
pkg/agent/packets_agent.go 0.00% 16 Missing :warning:
pkg/agent/config.go 8.33% 8 Missing and 3 partials :warning:
pkg/pbpacket/packet_grpc.pb.go 70.00% 7 Missing and 2 partials :warning:
pkg/grpc/packet/server.go 73.33% 6 Missing and 2 partials :warning:
pkg/agent/agent.go 30.00% 7 Missing :warning:
pkg/grpc/packet/client.go 68.75% 4 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #291 +/- ## ========================================== + Coverage 32.79% 34.04% +1.25% ========================================== Files 41 47 +6 Lines 3653 3836 +183 ========================================== + Hits 1198 1306 +108 - Misses 2379 2444 +65 - Partials 76 86 +10 ``` | [Flag](https://app.codecov.io/gh/netobserv/netobserv-ebpf-agent/pull/291/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/netobserv/netobserv-ebpf-agent/pull/291/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv) | `34.04% <38.57%> (+1.25%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netobserv#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jpinsonneau commented 3 months ago

/retest

jpinsonneau commented 3 months ago

Rebased + removed tcp packet capture https://github.com/netobserv/netobserv-ebpf-agent/pull/291/commits/6e65e79a0050842f22a82466d71bba97e02550ed

msherif1234 commented 3 months ago

I am good with the changes few nit left other than that LGTM up to u fixing them /LGTM

msherif1234 commented 3 months ago

/lgtm

msherif1234 commented 3 months ago

pls remember to update the operator https://github.com/netobserv/network-observability-operator/blob/1cd8e7670e47ee248965c72e5fc9bc8709fd615f/controllers/ebpf/agent_controller.go#L35

msherif1234 commented 3 months ago

/approve

openshift-ci[bot] commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msherif1234

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/netobserv/netobserv-ebpf-agent/blob/main/OWNERS)~~ [msherif1234] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jpinsonneau commented 3 months ago

pls remember to update the operator https://github.com/netobserv/network-observability-operator/blob/1cd8e7670e47ee248965c72e5fc9bc8709fd615f/controllers/ebpf/agent_controller.go#L35

Here is the PR: https://github.com/netobserv/network-observability-operator/pull/600