FX-1197: Add agent config and agent profiles to the managed Agent installation intent #3753
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.75) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #3753"
general
weight: 0.35
levan-m
What
Adds two optional, provider-neutral settings to the managed Agent installation intent (the ConfigMap the Fleet Daemon watches), wired into the generic provider decoder only (from #3751):
agentConfig—{"spec": <DatadogAgentSpec fragment>}merged over the bootstrap spec at install time. Bootstrap stays authoritative forclusterName,site, and the linux node selectors;spec.global.credentials/ cluster Agent tokens are rejected, so the Fleet-delivered credentials are never overridden. The shape matches the Fleet INSTALLER_CONFIG payload and the Datadog Agent setup page'sdatadog-agent.yaml, so a fragment such asfeatures.apm.instrumentation(single-step instrumentation) applies verbatim.agentProfiles—DatadogAgentProfileentries (name,profileAffinity,config.spec) created next to the managed DatadogAgent, mirroring the existing Windows profile: fleet ownership labels + controller owner reference, validated against the profile allowlists (gpu,apm,hostProfiler), garbage-collected via the owner reference on uninstall, and waited on bymanagedAgentInstallationResourcesAbsent. When profiles are requested the DatadogAgent is annotatedagent.datadoghq.com/update-metadata: "true", as required by the Agent Profiles feature.Both settings participate in the intent digest (canonicalized so JSON reformatting does not change it, which keeps replay-with-different-content protection covering the config), and uninstall intents carrying them are rejected.
The decode/merge/validate/digest logic lives in one shared
finalizeManagedAgentInstallationIntentused by the generic provider decoder. EKS is intentionally untouched: its decoder keeps its existing inline logic (noagentConfig/agentProfileson the EKS wire format, no EKS marketplace schema/template changes) and can adopt the shared finalize tail later. This PR is stacked on #3751 (fx-1127-generic-identity); merge order is #3751 first.Why
MCI installs the agent with a minimal bootstrap intent, so on generic-provider clusters (Nebius, CoreWeave — the provider added in #3751) a rule cannot request GPU monitoring (GPU-nodes-only via a
DatadogAgentProfilewithprofileNodeAffinity) or APM single-step instrumentation at install time. The only post-install remote path (update_operatorconfig deployments) patches the DatadogAgent only and cannot address profiles or node selectors. Carrying the config in the install intent makes rule-create → install → features on, with no manual YAML.Note that base APM is enabled by default in the operator (
defaultAPMEnabled = true), so theagentConfigpath is not needed for plain APM. It is for single-step instrumentation (which is not default-on) and other non-default settings.Live test on a real Nebius GPU cluster (2026-11-12)
Verified end-to-end against a Nebius managed Kubernetes GPU cluster with the generic provider:
gpu-nodesDatadogAgentProfile (VALID/APPLIED) → a second DaemonSet scheduled only on the GPU node, with the base DaemonSet desired count 0 on profile-matched nodes →DD_GPU_ENABLED=true, NVML detected, andgpu.*metrics (e.g.gpu.total_energy_consumption) arriving in Datadog.- Nebius:
nebius.com/gpu=true— notnvidia.com/gpu.present.- CoreWeave:
gpu.nvidia.com/class/gpu.coreweave.cloud/driver-version.- NVIDIA GPU operator:
nvidia.com/gpu.present.- EKS: no GPU label.
A wrong label is a silent no-op: the profile matches 0 nodes, the base DaemonSet covers the GPU node without GPU monitoring, and the fleet state still reports
DONE. Suggested follow-up: surface the matched-node count inDatadogAgentProfilestatus, or have the fleet daemon warn when a requested profile matches 0 nodes.nvidiaRuntimeClass (drivers are baked into the node image). Intents targeting managed-driver clouds must setfeatures.gpu.requiredRuntimeClassName: ""; the operator default is"nvidia", which leaves the agent pods unschedulable there.DD_KUBELET_TLS_VERIFY=falseis set on all agent containers.Testing
go test ./pkg/fleet/ -count=1green.go build ./...clean;make lintreports 0 issues.agentConfig/agentProfiles(merge semantics, bootstrap authority, digest stability across reformatting, digest change on config change), unsafe-settings table (credentials in agentConfig / profile config, unknown fields, reserved/duplicated/invalid profile names, missing affinity, feature outside the profile allowlist, settings on uninstall), profile lifecycle (create/validate/idempotent ensure/drift rejection), uninstall waits for fleet-owned profiles, and a fullinstallDatadogAgentwith profiles asserting the update-metadata annotation and the created profile.The dd-source counterpart (MCI rule
install_options→ intent plumbing) is ddoghq/dd-source#171714.🤖 Generated with Claude Code