Fix GKE Autopilot registry coercion for agent profiles#3260
Merged
Conversation
🛑 Gate Violations
ℹ️ Info🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 2f2ac90 | Docs | Datadog PR Page | Give us feedback! |
tbavelier
marked this pull request as ready for review
July 15, 2026 11:54
levan-m
approved these changes
Jul 15, 2026
3 tasks
tbavelier
added a commit
that referenced
this pull request
Jul 16, 2026
(cherry picked from commit 58b647b) Co-authored-by: Timothée Bavelier <[email protected]> Co-authored-by: levan-m <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Enforces the GCR registry constraint on the final
DatadogAgentInternalproduced after aDatadogAgentProfilemerge when GKE Autopilot is enabled.It also adds unit coverage for profiles that configure either
registry.datadoghq.comor the Datadog public ECR registry.Motivation
GKE Autopilot registry coercion previously ran only on the base
DatadogAgentcopy. Profile reconciliation happens later and can replacespec.global.registry, producing an Autopilot-annotatedDatadogAgentInternalwith images that are rejected by the GKE workload allowlist.Applying the constraint to the final merged object ensures every Autopilot profile uses an allowed GCR registry and that the generation hash reflects the corrected spec.
Additional Notes
This addresses the profile merge edge case identified in the review of #3254.
Minimum Agent Versions
No minimum Agent or Cluster Agent version is required.
Describe your test plan
Unit tests + on a kind/local cluster with 2 nodes+:
DatadogAgentmanifest with registry set toregistry.datadoghq.comand with the Autopilot annotationexperimental.agent.datadoghq.com/autopilot: "true"gcr.io/datadoghqregistry insteadChecklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel