feat(apm): add on-demand SSI for Cluster Agent #3372
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 270 lines diff across 3 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.335
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3372"
general
weight: 0.35
adel121
Description
On-demand SSI policies are delivered over Remote Config (
APM_POLICIES). TheCluster Agent subscribes to that product when
apm_config.instrumentation.on_demandis true (Agent default), but the Operator did not expose that setting or set
DD_APM_INSTRUMENTATION_ON_DEMANDon the Cluster Agent.This PR:
adds
spec.features.apm.instrumentation.onDemand(defaulttrue, matching the Agent and Helm chart)sets
DD_APM_INSTRUMENTATION_ON_DEMANDon the Cluster Agent from that valuemaps
datadog.apm.instrumentation.onDemandin yaml-mapperUnlike helm-charts#2868, Remote Configuration is already enabled on the Cluster Agent by default (
features.remoteConfiguration.enabled=true). This change does not gateDD_REMOTE_CONFIGURATION_ENABLED.With Operator defaults (APM, admission controller, Remote Config, and
onDemandall true; cluster-wide SSI off), the Cluster Agent is configured for annotation- and RC-based workload selection without enabling cluster-wide injection.Related Issue
Counterpart of https://github.com/DataDog/helm-charts/pull/2868
Follow-up to SSI on-demand RC E2E work in datadog-agent.
Type of Change
Checklist
How Has This Been Tested?
go test ./internal/controller/datadogagent/feature/apm/ ./internal/controller/datadogagent/defaults/ ./api/datadoghq/v2alpha1/make generate && make manifestsmake golden-update(Cluster Agent goldens now includeDD_APM_INSTRUMENTATION_ON_DEMAND=true)Minimum Agent Versions
Agent: n/a
Cluster Agent: 7.84.0+ (
apm_config.instrumentation.on_demand/APM_POLICIES)Older Cluster Agent images ignore
DD_APM_INSTRUMENTATION_ON_DEMAND.Additional Notes
Default DDA install after this PR:
DD_REMOTE_CONFIGURATION_ENABLED=true(already the Operator default)DD_APM_INSTRUMENTATION_ENABLED=falseDD_APM_INSTRUMENTATION_ON_DEMAND=true