Skip to content

add Kubernetes support#3

Merged
SRodi merged 7 commits into
mainfrom
k8s-support
Aug 12, 2025
Merged

add Kubernetes support#3
SRodi merged 7 commits into
mainfrom
k8s-support

Conversation

@SRodi
Copy link
Copy Markdown
Owner

@SRodi SRodi commented Aug 12, 2025

This pull request significantly expands and refactors the Makefile to support a more robust and flexible development workflow for both local and Kubernetes environments. It introduces new build targets for multiple binaries, adds containerization and Kubernetes deployment support, and improves developer experience with comprehensive help and cleaning commands.

The most important changes are:

Build System Enhancements:

  • Added separate build targets for both the server (build-server) and aggregator (build-aggregator) binaries, as well as a combined build target to build both at once. Also introduced a build-aggregator-only target for Docker builds without eBPF dependencies.
  • Introduced new variables for container image names and registry configuration, enabling flexible Docker builds for both agent and aggregator.

Containerization and Cross-Platform Support:

  • Added Docker build targets (docker-build-agent, docker-build-aggregator, docker-build) and push targets, with special handling for cross-compiling eBPF programs on macOS using Docker.
  • Provided cross-compilation targets (bpf-cross-compile, bpf-cross-clean) to facilitate building eBPF objects for ARM64 Linux from macOS hosts.

Kubernetes and Local Testing Integration:

  • Added Kubernetes deployment, undeployment, log viewing, and status targets, as well as a combined build-and-deploy target.
  • Introduced Kind (Kubernetes in Docker) workflow targets for local cluster creation, image loading, deployment, testing, and cleanup, improving local integration testing.

Developer Experience Improvements:

  • Expanded the help target to document all new and existing Makefile commands, including container, Kubernetes, and Kind targets, making onboarding and usage easier.
  • Added cleaning targets (clean-bpf, fresh-build, fresh-kind-build) for more granular or complete clean-and-rebuild operations.

@SRodi SRodi requested a review from Copilot August 12, 2025 20:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces comprehensive Kubernetes support to the eBPF monitoring system, expanding it from VM-only deployment to dual VM/Kubernetes support with a dedicated aggregator component. The changes enable cluster-wide monitoring with automatic metadata enrichment and maintain full backward compatibility.

  • New Kubernetes aggregator component for centralized event collection across cluster nodes
  • Complete Docker containerization with multi-stage builds and Kind local testing support
  • Extensive Kubernetes manifests, RBAC, and deployment automation scripts

Reviewed Changes

Copilot reviewed 29 out of 31 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
scripts/*.sh Deployment, testing, and Kind cluster management automation scripts
kubernetes/*.yaml Complete Kubernetes manifests for DaemonSet, Deployment, RBAC, and services
internal/kubernetes/ Kubernetes metadata provider for automatic node/pod/namespace enrichment
internal/aggregator/ New aggregator service for centralized event collection and API
internal/client/ Client library for agents to communicate with aggregator
docker/Dockerfile* Multi-stage Docker builds for both agent and aggregator components
cmd/aggregator/ New aggregator binary entrypoint with health checks and event APIs

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread scripts/test-kind.sh
Comment thread scripts/test-kind-deployment.sh Outdated
Comment thread scripts/test-kind-deployment.sh Outdated
Comment thread scripts/test-kind-deployment.sh Outdated
Comment thread scripts/test-kind-deployment.sh Outdated
Comment thread internal/programs/base.go
Comment thread internal/events/events.go Outdated
Comment thread internal/client/aggregator.go
Comment thread docker/Dockerfile
Comment thread cmd/aggregator/main.go Outdated
@SRodi SRodi requested a review from Copilot August 12, 2025 21:27
@SRodi SRodi merged commit 36e2462 into main Aug 12, 2025
5 checks passed
@SRodi SRodi deleted the k8s-support branch August 12, 2025 21:34
@SRodi SRodi review requested due to automatic review settings March 24, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants