Skip to content

[TON-742] Support managed DatadogAgent creation and removal - #3268

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 25 commits into
mainfrom
fanny/TON-723/operator-addon-lifecycle
Aug 10, 2026
Merged

[TON-742] Support managed DatadogAgent creation and removal#3268
gh-worker-dd-mergequeue-cf854d[bot] merged 25 commits into
mainfrom
fanny/TON-723/operator-addon-lifecycle

Conversation

@fanny-jiang

@fanny-jiang fanny-jiang commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds opt-in support for managed DatadogAgent creation and removal. The Operator reads lifecycle requests from a ConfigMap, creates or removes the DatadogAgent and Windows AgentProfile resources, and reports progress and completion through Remote Config.

The new flow coordinates with existing Fleet configuration updates so the two operations do not overwrite each other's state.

Motivation

After the EKS instrumenter installs the Operator EKS add-on, it needs a reliable way to create the DatadogAgent and confirm that removal has completed before removing the add-on.

Additional Notes

The feature is disabled by default. EKS is the first supported provider, while the managed-DatadogAgent flow remains provider-neutral and extensible. Existing DatadogAgent and DatadogAgentInternal reconciliation behavior is unchanged.

Minimum Agent Versions

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

Describe your test plan

  • CGO_ENABLED=0 go test ./cmd ./pkg/config ./pkg/fleet ./pkg/remoteconfig
  • CGO_ENABLED=0 make lint

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)

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 16, 2026

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 85.63%
Overall Coverage: 50.22% (+2.47%)

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

@fanny-jiang fanny-jiang added the enhancement New feature or request label Jul 16, 2026
@fanny-jiang
fanny-jiang changed the base branch from fanny/TON-723/operator-lifecycle-prerequisites to main July 16, 2026 20:11
@fanny-jiang fanny-jiang changed the title Add EKS add-on Agent lifecycle handling Add managed Agent lifecycle handling for EKS add-ons Jul 16, 2026
@fanny-jiang fanny-jiang changed the title Add managed Agent lifecycle handling for EKS add-ons Add managed Agent installation handling for EKS add-ons Jul 16, 2026
@fanny-jiang fanny-jiang changed the title Add managed Agent installation handling for EKS add-ons Add managed Agent installation intent handling Jul 17, 2026
@fanny-jiang fanny-jiang added this to the v1.29.0 milestone Jul 20, 2026
@fanny-jiang fanny-jiang changed the title Add managed Agent installation intent handling Support managed Agent installation and removal Jul 20, 2026
@fanny-jiang

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: d7f0b3296d

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

Comment thread cmd/main.go Outdated
@fanny-jiang

Copy link
Copy Markdown
Contributor Author

@codex review

@fanny-jiang
fanny-jiang marked this pull request as ready for review July 20, 2026 18:45
@fanny-jiang
fanny-jiang requested a review from a team July 20, 2026 18:45
@fanny-jiang
fanny-jiang requested a review from a team as a code owner July 20, 2026 18:45

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

Copy link
Copy Markdown

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: b92399a8e7

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

Comment thread pkg/fleet/managed_agent_installation_windows_profile.go

@gpalmz gpalmz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Really solid, thoroughly tested PR. Approving. Left a few comments - a couple are MED questions worth a look (the credential-guard casing bypass, the promote-reported-as-failed coupling, and the partial-stuck edge), the rest are minor.

Comment thread pkg/fleet/managed_agent_installation.go Outdated
Comment thread pkg/fleet/daemon_worker.go
Comment thread pkg/fleet/managed_agent_installation.go Outdated
Comment thread pkg/fleet/daemon.go Outdated
Comment thread pkg/fleet/managed_agent_installation_intent.go
@fanny-jiang fanny-jiang changed the title Support managed Agent installation and removal [TON-742] Support managed Agent installation and removal Jul 21, 2026
Comment thread pkg/fleet/managed_agent_installation_intent.go
@fanny-jiang fanny-jiang modified the milestones: v1.29.0, v1.30.0 Jul 24, 2026
@fanny-jiang
fanny-jiang force-pushed the fanny/TON-723/operator-addon-lifecycle branch from fafb31f to 4a06cf4 Compare August 5, 2026 20:51
@fanny-jiang fanny-jiang changed the title [TON-742] Support managed Agent installation and removal [TON-742] Support managed DatadogAgent creation and removal Aug 5, 2026
Comment thread pkg/fleet/managed_agent_installation_command.go
Comment thread pkg/fleet/managed_agent_installation.go Outdated
@fanny-jiang
fanny-jiang requested a review from a team as a code owner August 6, 2026 17:23
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit bf9fb87 into main Aug 10, 2026
54 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the fanny/TON-723/operator-addon-lifecycle branch August 10, 2026 19:18
gabedos pushed a commit that referenced this pull request Aug 11, 2026
…3341)

Harden lifecycle readiness prerequisites

Add EKS add-on lifecycle handling

Generalize lifecycle ownership metadata

Rename managed Agent installation support

Fix managed installation lint failures

Generalize managed Agent installation flow

Harden managed Agent installation handoff

Simplify managed Agent installation coordination

Limit managed installation integration scope

Preserve installation acknowledgement during uninstall

Separate managed installation from Remote Config

fix managed installation task arbitration

harden managed Agent installation handling

Improve managed installation test coverage

Preserve updates when managed install is disabled

Simplify managed installation flow

Fix managed Windows profile validation

Align managed installation namespace

Harden managed installation recovery

Use operator namespace for managed installs

Modernize owner reference pointers

Fix managed installation task recovery

Harden managed installation recovery

Fix managed installation cleanup

retrigger ci


(cherry picked from commit bf9fb87)

Co-authored-by: Fanny Jiang <fanny.jiang@datadoghq.com>
Co-authored-by: swang392 <sarah.wang@datadoghq.com>
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.

6 participants