datadog-operator icon indicating copy to clipboard operation
datadog-operator copied to clipboard

SBOM: limit env injection for SBOM feature to core agent

Open jinroh opened this issue 1 year ago • 1 comments

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/or dependencies
  • [x] PR has a milestone or the qa/skip-qa label

jinroh avatar Mar 15 '24 09:03 jinroh

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

Impacted file tree graph

@@           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 data Powered by Codecov. Last update e0fa00d...19a87ee. Read the comment docs.

codecov-commenter avatar Mar 15 '24 10:03 codecov-commenter