Skip to content

[BARX-1009] Use the ddot-collector image by default for the operator #2012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

AliDatadog
Copy link
Contributor

@AliDatadog AliDatadog commented Jun 27, 2025

What does this PR do?

Changes the logic for the image selection of the otel-agent container.

Image Selection Matrix
Scenario UseStandaloneImage Image Override OTel Agent Container Other Containers
Default true None gcr.io/datadoghq/ddot-collector:7.67.0 gcr.io/datadoghq/agent:7.67.0
Override + Supported true datadog/agent:7.68.0 datadog/ddot-collector:7.68.0 datadog/agent:7.68.0
Override + Custom Registry true custom.io/agent:1.0 custom.io/ddot-collector:1.0 custom.io/agent:1.0
Full Image (no override) false None gcr.io/datadoghq/agent:7.67.0-full gcr.io/datadoghq/agent:7.67.0-full
Full Image + Override false datadog/agent:7.66.0 /!\ broken datadog/agent:7.66.0 (unchanged) datadog/agent:7.66.0 (unchanged)
  • When UseStandaloneImage is true (default):
    • OTel Agent: respect the registry + tag override, not image name
    • Other containers: respect the entire override
  • When UseStandaloneImage is false:
    • If there's an explicit override: respect it entirely
    • If there's no override: apply the -full suffix

Motivation

ddot-collector is the recommended way to deploy the Agent.

Additional Notes

Anything else we should know when reviewing?

With image overrides, the user is responsible for setting the right flavor

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: v7.67.0

Describe your test plan

Write there any instructions and details you may have to test your PR.

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2025

Codecov Report

Attention: Patch coverage is 84.72222% with 11 lines in your changes missing coverage. Please review.

Project coverage is 47.13%. Comparing base (5dff879) to head (78a8a7c).

Files with missing lines Patch % Lines
...ller/datadogagent/feature/otelcollector/feature.go 91.93% 4 Missing and 1 partial ⚠️
...controller/datadogagent/component/agent/default.go 0.00% 3 Missing ⚠️
pkg/images/images.go 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2012      +/-   ##
==========================================
+ Coverage   47.00%   47.13%   +0.13%     
==========================================
  Files         255      255              
  Lines       25302    25356      +54     
==========================================
+ Hits        11892    11951      +59     
+ Misses      12794    12790       -4     
+ Partials      616      615       -1     
Flag Coverage Δ
unittests 47.13% <84.72%> (+0.13%) ⬆️

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

Files with missing lines Coverage Δ
pkg/testutils/builder.go 93.00% <100.00%> (+0.03%) ⬆️
...controller/datadogagent/component/agent/default.go 87.24% <0.00%> (+0.12%) ⬆️
pkg/images/images.go 96.36% <0.00%> (-1.79%) ⬇️
...ller/datadogagent/feature/otelcollector/feature.go 89.18% <91.93%> (+5.77%) ⬆️

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 5dff879...78a8a7c. Read the comment docs.

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

@AliDatadog AliDatadog force-pushed the ali/use-ddot-collector branch from a162ea0 to 296bb4c Compare June 30, 2025 13:16
@AliDatadog AliDatadog force-pushed the ali/use-ddot-collector branch from 51cb481 to 3a36e34 Compare July 1, 2025 09:00
@AliDatadog AliDatadog force-pushed the ali/use-ddot-collector branch from 3a36e34 to 7afbf5c Compare July 1, 2025 09:04
@AliDatadog AliDatadog marked this pull request as ready for review July 1, 2025 09:05
@AliDatadog AliDatadog requested review from a team as code owners July 1, 2025 09:05
@AliDatadog AliDatadog added the enhancement New feature or request label Jul 1, 2025
@AliDatadog AliDatadog added this to the v1.17.0 milestone Jul 1, 2025
Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (given my operator limitations, take with some🧂) :)

Copy link
Contributor

@estherk15 estherk15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left formatting suggestions for consistency.

@AliDatadog AliDatadog force-pushed the ali/use-ddot-collector branch 4 times, most recently from 43106cc to e4733d5 Compare July 4, 2025 09:53
@AliDatadog AliDatadog force-pushed the ali/use-ddot-collector branch from e4733d5 to 51b0bd3 Compare July 4, 2025 10:16
supportedVersion := utils.IsAboveMinVersion(agentVersion, "7.67.0-0")
if !supportedVersion {
// For unsupported versions, force UseStandaloneImage=false and log warning
if apiutils.BoolValue(ddaSpec.Features.OtelCollector.Enabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if apiutils.BoolValue(ddaSpec.Features.OtelCollector.Enabled) {
if apiutils.BoolValue(ddaSpec.Features.OtelCollector.Enabled) && apiutils.BoolValue(ddaSpec.Features.OtelCollector.Enabled.UseStandaloneImage) {

We should only log if the user is not explicitly disabling the standalone image ?

Copy link
Member

@tbavelier tbavelier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, overrides are reconciled after features, so image changes inside a feature are removed if user is specifying a nodeAgent image.name or image.tag. Logs should be kept, but ManageNodeAgent should be simplified accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants