SBOM: limit env injection for SBOM feature to core agent
What does this PR do?
This change make sure that we inject SBOM related env vars only to core agent container.
Motivation
Since https://github.com/DataDog/datadog-operator/pull/1044 the HOST_ROOT injected for security-agent was wrongly set to /host instead of /host/root. By limiting the env vars to the core agent container, we should avoid such regressions.
See incident-26035.
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
Write there any instructions and details you may have to test your PR.
Checklist
- [x] PR has at least one valid label:
bug,enhancement,refactoring,documentation,tooling, and/ordependencies - [x] PR has a milestone or the
qa/skip-qalabel
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 58.95%. Comparing base (
e0fa00d) to head (19a87ee).
Additional details and impacted files
@@ Coverage Diff @@
## main #1122 +/- ##
=======================================
Coverage 58.95% 58.95%
=======================================
Files 174 174
Lines 21371 21371
=======================================
Hits 12600 12600
Misses 8004 8004
Partials 767 767
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 58.95% <100.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| controllers/datadogagent/feature/sbom/feature.go | 77.39% <100.00%> (ø) |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e0fa00d...19a87ee. Read the comment docs.