Skip to content

Use resolved image for host-profiler seccomp init#3030

Closed
tbavelier wants to merge 1 commit into
theomagellan/unprivileged-host-profilerfrom
tbavelier/host-profiler-seccomp-init-image
Closed

Use resolved image for host-profiler seccomp init#3030
tbavelier wants to merge 1 commit into
theomagellan/unprivileged-host-profilerfrom
tbavelier/host-profiler-seccomp-init-image

Conversation

@tbavelier

Copy link
Copy Markdown
Member

What changed

The host-profiler seccomp setup init container now uses the image from the already-created host-profiler container instead of calling images.GetLatestAgentImage() directly.

Why

The host-profiler container image has already gone through the normal node-agent image resolution flow by the time ManageNodeAgent runs. That includes global registry and FIPS handling from global.ApplyGlobalSettingsNodeAgent / updateContainerImages.

Using images.GetLatestAgentImage() for the init container bypassed that resolved image and could make the pod reference a different Agent image than the host-profiler container. In practice, that can force nodes to pull the large Agent image more than once when registry/FIPS/global image settings rewrite the main container image but not this feature-added init container.

Reusing the resolved host-profiler image keeps the init container aligned with the main container and avoids extra image pulls for equivalent Agent content.

Validation

go test ./internal/controller/datadogagent/feature/hostprofiler ./internal/controller/datadogagent/component/agent ./internal/controller/datadogagent/feature/test ./internal/controller/datadogagentinternal

@codecov-commenter

codecov-commenter commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.95%. Comparing base (b03042c) to head (55e981b).

Files with missing lines Patch % Lines
...oller/datadogagent/feature/hostprofiler/feature.go 76.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                             Coverage Diff                             @@
##           theomagellan/unprivileged-host-profiler    #3030      +/-   ##
===========================================================================
- Coverage                                    42.21%   41.95%   -0.27%     
===========================================================================
  Files                                          337      336       -1     
  Lines                                        29292    28911     -381     
===========================================================================
- Hits                                         12365    12129     -236     
+ Misses                                       16113    15986     -127     
+ Partials                                       814      796      -18     
Flag Coverage Δ
unittests 41.95% <78.94%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...oller/datadogagent/feature/hostprofiler/seccomp.go 100.00% <100.00%> (ø)
...oller/datadogagent/feature/hostprofiler/feature.go 82.00% <76.47%> (-0.36%) ⬇️

... and 5 files with indirect coverage changes


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 b03042c...55e981b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented May 19, 2026

Copy link
Copy Markdown

Code Coverage  Pipelines

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 77.78% (threshold: 80.00%)

⚠️ Warnings

🚦 2 Pipeline jobs failed

pull request linter | Check Milestone   View in Datadog   GitHub Actions

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. Missing milestone or `qa/skip-qa` label during CI workflow execution.

pull request linter | build   View in Datadog   GitHub Actions

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. Missing required labels for the pull request. Valid labels are: ['bug', 'enhancement', 'refactoring', 'documentation', 'tooling', 'dependencies'].

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 77.78%
Overall Coverage: 42.30% (-0.23%)

Useful? React with 👍 / 👎

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

@tbavelier tbavelier closed this May 19, 2026
@tbavelier
tbavelier deleted the tbavelier/host-profiler-seccomp-init-image branch May 19, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants