1
0
Fork 0
mirror of https://github.com/imjasonh/snoop synced 2026-07-17 06:01:51 +00:00
Commit graph

3 commits

Author SHA1 Message Date
Jason Hall
a7f8a9a8fe Add multi-container pod support to snoop
Implement support for tracing multiple containers within a single
Kubernetes pod. This completes Milestone 4.

Changes:
- Add -cgroups flag for comma-separated cgroup paths
- Maintain backwards compatibility with -cgroup flag
- Add CgroupPaths []string field to Config
- Create helper utilities for container discovery
- Add comprehensive tests (all passing)
- Document multi-container usage patterns
- Include complete working example manifest

The implementation supports up to 64 containers per pod (eBPF map limit)
and allows selective tracing of specific containers while excluding
others (e.g., snoop's own container).

Files:
- pkg/config/config.go: Add CgroupPaths field and parsing
- cmd/snoop/main.go: Add -cgroups flag and multi-cgroup initialization
- pkg/cgroup/multi_container.go: Container discovery utilities
- pkg/config/config_test.go: Comprehensive test coverage
- deploy/kubernetes/README.md: Multi-container documentation
- deploy/kubernetes/multi-container-example.yaml: Working example
- MULTI_CONTAINER_SUPPORT.md: Implementation guide
- plan.md: Mark Milestone 4 complete

Signed-off-by: Jason Hall <jason@chainguard.dev>
2026-01-14 16:22:51 -05:00
Jason Hall
c6fec442b7 Add Kubernetes deployment manifests for snoop sidecar
Create comprehensive Kubernetes deployment resources:
- deployment.yaml: Example deployment with snoop sidecar
- rbac.yaml: ServiceAccount and ClusterRole for required permissions
- example-app.yaml: Complete nginx example showing sidecar integration
- README.md: Extensive documentation with quick start, configuration,
  troubleshooting, and best practices

Manifests include:
- Security context with minimal required capabilities
- Init container for cgroup discovery
- Health probes and metrics endpoints
- Resource limits and requests
- Prometheus annotations for scraping

Completes first deliverable of Milestone 4 (Kubernetes Integration).

Signed-off-by: Jason Hall <jason@chainguard.dev>
2026-01-14 11:00:17 -05:00
Jason Hall
f793a98161 initial commit
Signed-off-by: Jason Hall <jason@chainguard.dev>
2026-01-14 09:55:28 -05:00