Add support for HP in DAP - #3299
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: ee6ac6c | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 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".
| if v, ok := profile.GetAnnotations()[annotationKey]; ok { | ||
| if ddai.Annotations == nil { | ||
| ddai.Annotations = make(map[string]string) | ||
| } | ||
| ddai.Annotations[annotationKey] = v |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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
?
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
=> Ensure the host profiler is only deployed to nodegroup worker1
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel