Skip to content

Identity and Agent enhancements (pt.3) + Cfcli update#129

Merged
LorenzoTettamanti merged 20 commits intoCortexFlow:feature/ebpf-corefrom
LorenzoTettamanti:identity_enhancements
Aug 23, 2025
Merged

Identity and Agent enhancements (pt.3) + Cfcli update#129
LorenzoTettamanti merged 20 commits intoCortexFlow:feature/ebpf-corefrom
LorenzoTettamanti:identity_enhancements

Conversation

@LorenzoTettamanti
Copy link
Member

@LorenzoTettamanti LorenzoTettamanti commented Aug 21, 2025

This PR introduces a new set of features and fixes for the existing issues: [#123] [#92] [#93][#130].

Changelog:
CLI:

  • Added new CLI command: cfcli monitoring list (return the list of available gRPC API endpoints)
  • Added new CLI command: cfcli monitoring connections (return the latest connections detected by the identity service)
  • Updated installation command:
    1. Added cfcli install cortexflow command to install all the cortexbrain components
    2. Added cfcli install simple-example to install test pods

Agent:

  • Updated agent protobuf file
  • Added an EventSender trait to send the events from the bpf_maps to the CLI using an MPSC architecture
  • Updated agent.yaml manifest

Identity:

  • Updated map pinner function
  • updated identity.yaml manifest

General:

  • Added build-all.sh to build and push all the core docker images

Installation/Tests:

  • Install the cortexflow-agent using the agent.yaml file
  • [Recommended] Install the identity service using the cli or the identity.yaml file
  • Test the new CLI functions directly from the cli directory (CortexBrain/cli):
    cargo run monitoring list
    cargo run monitoring connections

Expected result:
cargo run monitoring list

[SYSTEM] Founded config files
[SYSTEM] Readed configs for env variable: "Kubernetes"
=====> Connected to CortexFlow Server Reflection
Available services:
ActiveConnections

cargo run monitoring connections

Example:
{""62"": ""67.120.244.10"", ""294209"": ""65.120.244.10"", ""294054"": ""68.120.244.10"", ""314239"": ""67.120.244.10"", ""312314"": ""68.120.244.10"", ""294145"": ""65.120.244.10"", ""300935"": ""66.120.244.10"", ""300840"": ""65.120.244.10"", ""294111"": ""66.120.244.10"", ""312315"": ""68.120.244.10"", ""294153"": ""65.120.244.10"", ""300940"": ""66.120.244.10"", ""0"": ""66.120.244.10"", ""294071"": ""67.120.244.10"", ""312319"": ""68.120.244.10"", ""294155"": ""67.120.244.10"", ""312018"": ""67.120.244.10"", ""312020"": ""67.120.244.10"", ""294151"": ""67.120.244.10"", ""300938"": ""66.120.244.10"", ""302296"": ""65.120.244.10"", ""314240"": ""67.120.244.10"", ""300860"": ""65.120.244.10"", ""312318"": ""68.120.244.10"", ""294211"": ""68.120.244.10"", ""294154"": ""65.120.244.10"", ""294159"": ""65.120.244.10"", ""300871"": ""65.120.244.10"", ""300872"": ""65.120.244.10"", ""307618"": ""67.120.244.10"", ""294149"": ""65.120.244.10"", ""300933"": ""66.120.244.10"", ""312298"": ""68.120.244.10"", ""294053"": ""68.120.244.10"", ""312312"": ""68.120.244.10"", "0": "0", ""312313"": ""68.120.244.10"", ""294173"": ""65.120.244.10"", ""294080"": ""68.120.244.10"", ""312316"": ""68.120.244.10""}

Notes:
Tested using minikube with calico cnI

CLi tests:
Schermata del 2025-08-21 12-02-06

Agent Backend:
Schermata del 2025-08-21 16-31-55

…ll the functions to connect to the agent api client. requests.rs contains all the functions to send a request to the agent api server
…er in identity.yaml. Added maps check in agent.yaml
…rom the agent to the cli using tokio::mpsc. Updated dependencies
…onitoring list, cfcli monitoring connections
@LorenzoTettamanti LorenzoTettamanti self-assigned this Aug 21, 2025
@LorenzoTettamanti LorenzoTettamanti added enhancement New feature or request rust Pull requests that update Rust code labels Aug 21, 2025
@LorenzoTettamanti LorenzoTettamanti added cortexflow cli CLI related issues ebpf eBPF related tasks labels Aug 21, 2025
@LorenzoTettamanti LorenzoTettamanti moved this to In Progress in CortexFlow v0.1 Aug 21, 2025
@LorenzoTettamanti
Copy link
Member Author

@siddh34 Edit: if the identity service returns "Error while pinning bpf_maps: BPF_OBJ_PIN failed" this is a temporary fix:

  • Access the cluster using the bpftool-control-manager container (you can find it in the identity pod)
  • delete the maps directory in /sys/fs/bpf
  • restart the identity service

This is just a temporary fix

@LorenzoTettamanti LorenzoTettamanti changed the title Identity and Agent enhancements (pt.3) Identity and Agent enhancements (pt.3) + Cfcli update Aug 22, 2025
@siddh34
Copy link
Collaborator

siddh34 commented Aug 23, 2025

image

Working as expected!

Good work man!

@LorenzoTettamanti

@LorenzoTettamanti
Copy link
Member Author

Thanks mate! I'm merging the changes🚀🚀

@LorenzoTettamanti LorenzoTettamanti merged commit f8ed1e0 into CortexFlow:feature/ebpf-core Aug 23, 2025
@LorenzoTettamanti LorenzoTettamanti deleted the identity_enhancements branch September 2, 2025 16:09
@LorenzoTettamanti LorenzoTettamanti moved this from In Progress to Done in CortexFlow v0.1 Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cortexflow cli CLI related issues ebpf eBPF related tasks enhancement New feature or request rust Pull requests that update Rust code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants