Skip to content

[Backport v1.29] Fix GKE Autopilot registry coercion for agent profiles#3263

Merged
tbavelier merged 2 commits into
v1.29from
backport-3260-to-v1.29
Jul 16, 2026
Merged

[Backport v1.29] Fix GKE Autopilot registry coercion for agent profiles#3263
tbavelier merged 2 commits into
v1.29from
backport-3260-to-v1.29

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Jul 15, 2026

Copy link
Copy Markdown

Backport 58b647b from #3260.


What does this PR do?

Enforces the GCR registry constraint on the final DatadogAgentInternal produced after a DatadogAgentProfile merge when GKE Autopilot is enabled.

It also adds unit coverage for profiles that configure either registry.datadoghq.com or the Datadog public ECR registry.

Motivation

GKE Autopilot registry coercion previously ran only on the base DatadogAgent copy. Profile reconciliation happens later and can replace spec.global.registry, producing an Autopilot-annotated DatadogAgentInternal with 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.

  • Agent: N/A
  • Cluster Agent: N/A

Describe your test plan

Unit tests + on a kind/local cluster with 2 nodes+:

  • Deploy operator with profiles enabled
  • Apply a DatadogAgent manifest with registry set to registry.datadoghq.com and with the Autopilot annotation experimental.agent.datadoghq.com/autopilot: "true"
    • Note you will get error logs in the operator about not being able to apply the allowlistsynchronizer (CRD from GKE) that can be ignored
  • Apply a valid profile so you have 2 DDAIs (default + profile one)
  • Ensure each DDAI has gcr.io/datadoghq registry instead
╭─ ~/tmp/profiles                                                                                                                         󱃾 kind-local-k8s/system 13:50:27
╰─❯ k get dd datadog-agent -oyaml | yq .spec.global.registry
registry.datadoghq.com
╭─ ~/tmp/profiles                                                                                                                         󱃾 kind-local-k8s/system 13:52:39
╰─❯ k get ddai datadog-agent -oyaml | yq .spec.global.registry
gcr.io/datadoghq
╭─ ~/tmp/profiles                                                                                                                         󱃾 kind-local-k8s/system 13:52:47
╰─❯ k get ddai foo -oyaml | yq .spec.global.registry
gcr.io/datadoghq

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 signed (see: signing commits)

@dd-octo-sts dd-octo-sts Bot added bug Something isn't working backport label added by backport action bot label added by backport bot labels Jul 15, 2026
@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner July 15, 2026 15:24
@dd-octo-sts dd-octo-sts Bot added this to the v1.29.0 milestone Jul 15, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 15, 2026

Copy link
Copy Markdown

Code Coverage

Fix all issues with BitsAI

🛑 Gate Violations

🎯 1 Code Coverage issue detected

A Patch coverage percentage gate may be blocking this PR.

Patch coverage: 55.56% (threshold: 80.00%)

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 55.56%
Overall Coverage: 46.45% (+0.00%)

Useful? React with 👍 / 👎

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

@tbavelier
tbavelier merged commit c767243 into v1.29 Jul 16, 2026
34 of 35 checks passed
@tbavelier
tbavelier deleted the backport-3260-to-v1.29 branch July 16, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport label added by backport action bot label added by backport bot bug Something isn't working mergequeue-status: error team/container-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants