← Back to Pull requests

Move FHP config to CRD #3591

Open
unknown opened this pull request with 469 lines diff across 5 files
View on GitHub
unknown unknown commented on Oct 12, 2026 15:33 UTC
Author

What does this PR do?

This PR moves the host profiler config to the CRD. It also ensures the feature is supported by DAP, like the annotations previously were. Annotation support will be kept for 1-2 releases, and CRD takes precedence over the annotations.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

Agent: vX.Y.Z
Cluster Agent: vX.Y.Z

Describe your test plan

Setup

Install the CRDs from this branch:

kubectl apply --server-side --force-conflicts -f config/crd/bases/v1/

Run the operator from this branch with datadogAgentProfile.enabled=true.

Create the API key secret:

kubectl -n datadog create secret generic datadog-secret --from-literal=api-key=<API_KEY>

Base DatadogAgent used by all test cases:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
  namespace: datadog
  annotations:
    experimental.agent.datadoghq.com/image-override-config:
'{"host-profiler":{"name":"datadog/ddot-ebpf-dev:nightly-main"}}'
spec:
  global:
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key

1. Enable through the CRD

Add to the base DatadogAgent:

spec:
  features:
    hostProfiler:
      enabled: true
      runAsNonRoot: true
      seccomp:
        loggingEnabled: true

Expected: the agent pod is running and has a host-profiler container. Its security context has runAsUser: 100 and a Localhost seccomp profile ending in -logging. The host-profiler logs show symbol uploads.

2. Annotations still work

Remove spec.features and add the annotation:

metadata:
  annotations:
    agent.datadoghq.com/host-profiler-enabled: "true"

Expected: the agent pod has a host-profiler container.

3. The CRD takes precedence over annotations

Keep the annotation from test 2 and add:

spec:
  features:
    hostProfiler:
      enabled: false

Expected: the agent pod has no host-profiler container.

4. A DAP enables it through the CRD

Use the base DatadogAgent (no host profiler) and apply:

apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgentProfile
metadata:
  name: hp-profile
  namespace: datadog
spec:
  profileAffinity:
    profileNodeAffinity:
      - key: <node-label>
        operator: In
        values: ["<value>"]
  config:
    features:
      hostProfiler:
        enabled: true
    override:
      nodeAgent:
        containers:
          host-profiler:
            resources:
              limits:
                memory: 768Mi

Expected: the DAP is applied. The host-profiler container runs only on the matching nodes (hp-profile-agent DaemonSet), with a 768Mi memory limit.

5. A DAP disables what the DDA enables

Set on the DatadogAgent:

spec:
  features:
    hostProfiler:
      enabled: true

Set on the DAP:

spec:
  config:
    features:
      hostProfiler:
        enabled: false

Expected: datadog-agent pods have a host-profiler container, hp-profile-agent pods don't.

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

    Diff: 469 lines (+351 / -118) across 5 files Reviewer: mackjmr Review duration: 3803m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.69) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.69 · 469 lines diff across 5 files
    0.69
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.368
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.069
    Real PR Conversation Timeline
    1 comments
    "Review active on #3591"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 46.7% reviewed sensitive_module
    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: 68.8% (HIGH) · Higher = larger blast radius
    68.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 36.7% · Moderate risk
    36.7%