Skip to content

Add support for HP in DAP - #3299

Open
mackjmr wants to merge 2 commits into
mainfrom
mackjmr/hp-dap
Open

Add support for HP in DAP#3299
mackjmr wants to merge 2 commits into
mainfrom
mackjmr/hp-dap

Conversation

@mackjmr

@mackjmr mackjmr commented Jul 23, 2026

Copy link
Copy Markdown
Member

What does this PR do?

This PR adds support for host profiler in Datadog agent profiles, by adding support for the image annotation, hp seccomp and hp enabled annotations.

Motivation

Selective deployments of host profiler.

Additional Notes

Will switch to CRD once host profiler is out of experimental.

Describe your test plan

  • Deploy agent without host profiler
  • Deploy following profile
apiVersion: datadoghq.com/v1alpha1
kind: DatadogAgentProfile
metadata:
  name: host-profiler
  namespace: system
  annotations:
    agent.datadoghq.com/host-profiler-enabled: "true"
    agent.datadoghq.com/host-profiler-seccomp-enabled: "true"
    experimental.agent.datadoghq.com/image-override-config: '{"host-profiler":{"name":"datadog/ddot-ebpf-dev:nightly-main"}}'
spec:
  profileAffinity:
    profileNodeAffinity:
      - key: eks.amazonaws.com/nodegroup
        operator: In
        values:
          - worker1
  config: {}

=> Ensure the host profiler is only deployed to nodegroup worker1

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)

@datadog-official

datadog-official Bot commented Jul 23, 2026

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 47.93% (+0.77%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ee6ac6c | Docs | Datadog PR Page | Give us feedback!

@mackjmr mackjmr added the enhancement New feature or request label Jul 23, 2026
@mackjmr
mackjmr marked this pull request as ready for review July 23, 2026 14:31
@mackjmr
mackjmr requested a review from a team July 23, 2026 14:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee6ac6c36b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +358 to +362
if v, ok := profile.GetAnnotations()[annotationKey]; ok {
if ddai.Annotations == nil {
ddai.Annotations = make(map[string]string)
}
ddai.Annotations[annotationKey] = v

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Merge host-profiler image overrides instead of replacing

In the imageOverrideAnnotationKey iteration of this loop, a DAP host-profiler image override replaces the entire inherited experimental.agent.datadoghq.com/image-override-config annotation on the generated DDAI. When the base DDA already uses that annotation for other containers, applyExperimentalImageOverrides applies those entries to matching containers, so the selected profile DaemonSet silently loses DDA-level agent/trace-agent image overrides unless the profile duplicates them. Please merge or filter the profile's host-profiler entry instead of overwriting the whole JSON annotation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how we want to address this, we could either:

  • have the dap image-override-config annotation fully override the dda image-override-config annotation
  • merge both the dap image-override-config annotation and dda image-override-config annotation

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant