enable CNM direct send by default#3045
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: 13f2148 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3045 +/- ##
==========================================
+ Coverage 43.62% 44.13% +0.50%
==========================================
Files 349 352 +3
Lines 30057 30485 +428
==========================================
+ Hits 13112 13454 +342
- Misses 16075 16150 +75
- Partials 870 881 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f159b0bea8
ℹ️ 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".
| const directSendMinVersion = "7.77.0-0" | ||
| defaultIfVersionUnknown := false | ||
| const directSendMinVersion = "7.81.0-0" | ||
| defaultIfVersionUnknown := true |
There was a problem hiding this comment.
Treat unknown agent versions as unsupported for direct send
Setting defaultIfVersionUnknown := true makes IsAboveMinVersion pass when the node-agent tag is unparsable (for example custom tags like latest or digest-based tags), so direct send remains enabled and the process-agent container is dropped by if !directSendEnabled. For deployments actually running <7.81.0 behind non-semver tags, this forces an unsupported data path and can break CNM/USM telemetry; the same fallback was also switched in feature/usm/feature.go, so unknown versions should continue to default to unsupported.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Moving the milestone to 1.28, as 1.27 will be released in a few days. This is a valid concern however: some people use latest in their manifest, so once 1.28 is released (in 5~ weeks), we need to make sure .81 is also released
f159b0b to
1474588
Compare
tbavelier
left a comment
There was a problem hiding this comment.
Could you please include QA instructions: e.g. add the annotation set to true, verify XX, set the annotation to false, verify YY, remove the annotation, test with Agent version X.Y, verify that, test with Agent version X.Y+2, verify this
enable CNM direct send by default fix default test proper fix add test for USM defaults if enabled use annotation instead of CRD re-generate fix default fix default test fix process-agent apparmor default to false for unknown versions (cherry picked from commit 5c6a923) Co-authored-by: Bryce Kahle <[email protected]>
What does this PR do?
Enables CNM/USM direct send if agent version is >= 7.81.0
Motivation
Enabling direct send at the operator level first.
Additional Notes
Minimum Agent Versions
Describe your test plan
Add
agent.datadoghq.com/cnm-direct-send-enabled=trueannotationDD_NETWORK_CONFIG_DIRECT_SEND=falsedirect sender startedlog should NOT be present insystem-probelogs.process-agentcontainer should be presentDD_NETWORK_CONFIG_DIRECT_SEND=truedirect sender startedlog should be present insystem-probelogs.process-agentcontainer should NOT be presentSet
agent.datadoghq.com/cnm-direct-send-enabled=falseannotationDD_NETWORK_CONFIG_DIRECT_SEND=falsedirect sender startedlog should NOT be present insystem-probelogs.process-agentcontainer should be presentChecklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel