Skip to content

feat: profiling config + node -config plumbing (ADR 0011, slice 6a) - #32

Merged
kfeofantov merged 1 commit into
mainfrom
feat/ebpf-profiling-config
Aug 11, 2026
Merged

kfeofantov merged 1 commit into
mainfrom
feat/ebpf-profiling-config

Conversation

@kfeofantov

Copy link
Copy Markdown
Contributor

Slice 6a (plan, ADR 0011). First of the split slice 6 (6a config → 6b targeting → 6c live pipeline). Config + node -config plumbing, no behavior yet.

What's here

  • config.Profiling — shared by both roles:
    • Eligible set (eligibleNamespaces, optional eligibleWorkloads) — which workloads may be profiled at all. Empty admits none (deny-by-default; profiling is an explicit allow-list, the posture of a security boundary).
    • Symbol allow-list (allowedModulePrefixes, thirdPartySymbols) — which frames leave the node (ADR 0011 §4) — the two allow-lists, kept separate as agreed.
    • Cadence (topN, captureDurationSeconds=60, intervalSeconds, overheadCeilingPercent interpreted as a duty-cycle bound).
    • Normalized() fills numeric/policy defaults without inventing an eligible set.
  • cmd/agent/node.go — the node learns -config and reads Profiling. -enable-ebpf stays the master switch; this config is additive, so the manifest interface changes once. Loaded, normalized, logged; consumed in 6c.
  • deploy/node-daemonset-ebpf.yaml — -config + a ConfigMap volume + a sample runtime-agent-node-config (eligible set empty = opt-in; symbol allow-list documented as the control that lets frames leave the node).

Checks

go test -race (config + cmd/agent), build darwin + GOOS=linux, golangci-lint — clean. Manifest YAML validated (ConfigMap keys match the struct tags; caps unchanged [SYS_PTRACE, BPF, PERFMON], still no privileged).

Next

6b — targeting endpoint + atomic top-N publisher + node query client (config-bounded). 6c — the live capture→group→filter→serialize→validate→ship pipeline.

🤖 Generated with Claude Code

Add the Profiling configuration and teach the node role to read it, ahead of the
targeting endpoint and the live pipeline (slices 6b/6c). No behavior beyond
loading and logging.

- internal/config: a Profiling struct shared by both roles — an explicit
  eligible workload set (namespaces, optional names; empty admits none, the
  deny-by-default posture of a security boundary), the symbol allow-list and
  third-party policy (ADR 0011 §4), and the cadence knobs (TopN, capture
  duration default 60s, interval, and an overhead ceiling interpreted as a
  duty-cycle bound). Normalized fills numeric/policy defaults without inventing
  an eligible set.
- cmd/agent/node.go: the node learns -config and reads Profiling. -enable-ebpf
  stays the master switch; this config is additive, so the manifest interface
  changes once. The config is loaded, normalized, and logged; the pipeline that
  consumes it is slice 6c.
- deploy/node-daemonset-ebpf.yaml: -config plus a ConfigMap volume and a sample
  runtime-agent-node-config with the eligible set empty (opt-in) and the symbol
  allow-list documented as the control that lets stack frames leave the node.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kfeofantov
kfeofantov merged commit 7d21adb into main Aug 11, 2026
3 checks passed
@kfeofantov
kfeofantov deleted the feat/ebpf-profiling-config branch August 11, 2026 19:55
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.

1 participant