Skip to content

Allow using FIPS variants of ddot-collector and agent -full images#2605

Merged
levan-m merged 12 commits intomainfrom
agagniere/fips-full-and-ddot-fips
Apr 3, 2026
Merged

Allow using FIPS variants of ddot-collector and agent -full images#2605
levan-m merged 12 commits intomainfrom
agagniere/fips-full-and-ddot-fips

Conversation

@agagniere
Copy link
Copy Markdown
Contributor

@agagniere agagniere commented Feb 13, 2026

Preserve useFIPSAgent setting when overriding the agent version tag

What does this PR do?

useFIPSAgent setting now applies to agent -full and ddot-collector images.

Motivation

We will start publishing FIPS variants of those images soon: DataDog/datadog-agent#46053

OTAGENT-845

Minimum Agent Versions

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

Agent: v7.78.0

can be merged before as the check makes sure the combination is valid

Describe your test plan

I added a few test cases

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
  • All commits are signed1

Footnotes

  1. https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

@agagniere agagniere added this to the v1.25.0 milestone Feb 13, 2026
@agagniere agagniere requested a review from mackjmr February 13, 2026 13:49
@agagniere agagniere self-assigned this Feb 13, 2026
@agagniere agagniere added enhancement New feature or request do-not-merge labels Feb 13, 2026
@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from fdb5e60 to ea11e23 Compare February 13, 2026 13:59
@agagniere agagniere changed the title Allow using FIPS variants of ddot-collector and agent -full image. Allow using FIPS variants of ddot-collector and agent -full images Feb 13, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 76.92308% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.21%. Comparing base (3ef9c91) to head (223c130).

Files with missing lines Patch % Lines
...al/controller/datadogagent/component_reconciler.go 0.00% 3 Missing and 1 partial ⚠️
...troller/datadogagent/controller_reconcile_agent.go 0.00% 3 Missing and 1 partial ⚠️
...oller/datadogagentinternal/component_reconciler.go 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2605      +/-   ##
==========================================
- Coverage   39.24%   39.21%   -0.03%     
==========================================
  Files         314      314              
  Lines       27288    27298      +10     
==========================================
- Hits        10708    10706       -2     
- Misses      15792    15802      +10     
- Partials      788      790       +2     
Flag Coverage Δ
unittests 39.21% <76.92%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
internal/controller/datadogagent/global/global.go 55.09% <100.00%> (+1.95%) ⬆️
pkg/images/images.go 97.34% <100.00%> (-0.24%) ⬇️
...al/controller/datadogagent/component_reconciler.go 71.71% <0.00%> (-3.02%) ⬇️
...troller/datadogagent/controller_reconcile_agent.go 65.62% <0.00%> (-0.84%) ⬇️
...oller/datadogagentinternal/component_reconciler.go 0.00% <0.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 3ef9c91...223c130. Read the comment docs.

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

@levan-m levan-m removed this from the v1.25.0 milestone Mar 3, 2026
@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from ea11e23 to 482fefb Compare March 23, 2026 15:22
@agagniere agagniere added this to the v1.26.0 milestone Mar 23, 2026
@agagniere agagniere marked this pull request as ready for review March 23, 2026 15:26
@agagniere agagniere requested a review from a team March 23, 2026 15:26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 482fefbed0

ℹ️ 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".

@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from f0ea705 to 5c1726e Compare March 26, 2026 17:51
@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from 5c1726e to 6d35212 Compare March 27, 2026 14:46
@agagniere agagniere requested a review from a team as a code owner March 27, 2026 14:46
@agagniere agagniere requested a review from asopkin March 27, 2026 14:46
isFull: true,
},
want: "gcr.io/datadoghq/agent:7.64.0-fips-jmx",
want: "gcr.io/datadoghq/agent:7.64.0-fips-full",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does fips-full include jmx?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from b5b4eb5 to df0544d Compare March 31, 2026 09:28
@agagniere agagniere requested review from Copilot and levan-m and removed request for a team and asopkin March 31, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables the use of FIPS variants of ddot-collector and agent -full images by introducing version validation and preserving the useFIPSAgent setting when overriding the agent version tag. The PR introduces a minimum version check (v7.78.0) for when these FIPS variants started being published, and fixes a pre-existing parsing bug where Full suffix combined with FIPS or JMX would not be handled correctly.

Changes:

  • Added DDOTFIPSMinimumVersion constant to define when FIPS variants became available for ddot-collector and -full images
  • Implemented FIPSVersionError() method to validate FIPS version compatibility
  • Refactored tag suffix parsing into a separate parseTagSuffixes() function to handle all combinations of suffixes correctly
  • Added validation calls in reconcilers to catch incompatible FIPS version combinations
  • Enhanced ToString() method to properly handle FIPS+Full combinations
  • Added comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/images/images.go Added FIPS version validation, refactored tag parsing to fix pre-existing bug, improved suffix handling logic
pkg/images/images_test.go Added test cases for FIPS+Full combinations, FIPS version validation, and updated existing test expectations
internal/controller/datadogagent/global/global.go Added ValidateFIPSVersions function and improved method chaining
internal/controller/datadogagent/global/global_test.go Added comprehensive tests for FIPS version validation
internal/controller/datadogagent/controller_reconcile_agent.go Integrated FIPS version validation after all image modifications
internal/controller/datadogagent/component_reconciler.go Integrated FIPS version validation in component reconciliation
internal/controller/datadogagentinternal/component_reconciler.go Same FIPS validation integration for internal component reconciliation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

agagniere and others added 11 commits April 3, 2026 10:21
Preserve useFIPSAgent setting when overriding the agent version tag
Parse tag suffixes right to left (Full -> JMX -> FIPS) in fromImageConfig,
matching the existing logic in FromString. Previously, checking FIPS before
Full meant that -fips-full tags were misidentified: the FIPS flag was missed
and -fips was left in the base tag, leading to double suffixes like
-fips-fips-full when combined with a FIPS-enabled current image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract parseTagSuffixes helper and use it in both FromString and
fromImageConfig. When the name contains a tag, fromImageConfig now
delegates directly to FromString instead of duplicating the logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@agagniere agagniere force-pushed the agagniere/fips-full-and-ddot-fips branch from 660cbb4 to fee75a5 Compare April 3, 2026 08:22
@levan-m levan-m merged commit 8fa2be8 into main Apr 3, 2026
37 checks passed
@levan-m levan-m deleted the agagniere/fips-full-and-ddot-fips branch April 3, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants