← Back to Pull requests

feat(private-action-runner): add packet capture socket mount #3615

Closed
unknown closed this pull request without merging on Oct 28, 2026 13:06 UTC
View on GitHub
unknown unknown commented on Oct 15, 2026 16:37 UTC
Author

What does this PR do?

Adds opt-in remote packet capture support to the node Private Action Runner. The runner gets access to a system-probe socket that serves only the packet_capture module; the full system-probe socket (/var/run/sysprobe/sysprobe.sock) is not mounted into the runner. The cluster-agent runner is unchanged.

Configuration

agent.datadoghq.com/private-action-runner-enabled: "true"
agent.datadoghq.com/private-action-runner-packet-capture-enabled: "true"

The annotation accepts only "true" or "false"; invalid values are rejected before the node pod template is modified. It has no effect unless node PAR is enabled. When enabled, the system-probe container is added to the node agent pod.

Mounts and env

| Item | system-probe | private-action-runner |
|---|---|---|
| emptyDir sysprobe-capture-socket-dir at /var/run/sysprobe-capture | Read-write | Read-only |
| DD_PACKET_CAPTURE_SOCKET=/var/run/sysprobe-capture/capture.sock | Yes | Yes |
| DD_PACKET_CAPTURE_ENABLED=true | Yes | No |
| emptyDir sysprobe-socket-dir at /var/run/sysprobe (main socket) | Read-write | Not mounted |
| Capabilities SYS_ADMIN, SYS_RESOURCE, NET_ADMIN, NET_RAW, IPC_LOCK | Added | Unchanged |

The main socket dir and capabilities are added so system-probe can start when packet capture is its only consumer.

Motivation

The PAR action com.datadoghq.remoteaction.pcap.runCapture calls system-probe's packet_capture module. Under the Operator the runner container has no path to system-probe, so the call fails with dial unix ...: no such file or directory.

Additional Notes

Depends on a datadog-agent change that adds packet_capture.socket (DD_PACKET_CAPTURE_SOCKET), a second system-probe socket serving only packet capture. Companion datadog-agent PR: https://github.com/DataDog/datadog-agent/pull/58221.

Follows the structure of #3319 (systemd host mounts): separate packet_capture.go, strict bool annotation parsing, validation before pod template mutation.

Minimum Agent Versions

Agent: TBD (release containing the companion datadog-agent change)
Cluster Agent: N/A

Describe your test plan

  • Unit tests in packet_capture_test.go (annotation parsing, required components, mounts/env, invalid value rejection).

  • Reconcile test asserting the DaemonSet has the system-probe container, the capture socket volume and mounts, and no main system-probe socket mount in the runner.

  • go test ./internal/controller/datadogagent/..., go vet, golangci-lint pass.
  • Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    🤖 Generated with Claude Code

    Diff: 373 lines (+279 / -94) across 4 files Reviewer: Mathew-Estafanous Review duration: 18509m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 373 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3615"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%