Repository navigation
feat: profiling config + node -config plumbing (ADR 0011, slice 6a) - #32
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 6a (plan, ADR 0011). First of the split slice 6 (6a config → 6b targeting → 6c live pipeline). Config + node
-configplumbing, no behavior yet.What's here
config.Profiling— shared by both roles:eligibleNamespaces, optionaleligibleWorkloads) — 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).allowedModulePrefixes,thirdPartySymbols) — which frames leave the node (ADR 0011 §4) — the two allow-lists, kept separate as agreed.topN,captureDurationSeconds=60,intervalSeconds,overheadCeilingPercentinterpreted as a duty-cycle bound).Normalized()fills numeric/policy defaults without inventing an eligible set.cmd/agent/node.go— the node learns-configand readsProfiling.-enable-ebpfstays 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 sampleruntime-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 noprivileged).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