Skip to content

feat(apm): add on-demand SSI for Cluster Agent - #3372

Draft
iamluc wants to merge 1 commit into
mainfrom
luc/ssi-on-demand-operator
Draft

feat(apm): add on-demand SSI for Cluster Agent#3372
iamluc wants to merge 1 commit into
mainfrom
luc/ssi-on-demand-operator

Conversation

@iamluc

@iamluc iamluc commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

On-demand SSI policies are delivered over Remote Config (APM_POLICIES). The
Cluster Agent subscribes to that product when apm_config.instrumentation.on_demand
is true (Agent default), but the Operator did not expose that setting or set
DD_APM_INSTRUMENTATION_ON_DEMAND on the Cluster Agent.

This PR:

  • adds spec.features.apm.instrumentation.onDemand (default true, matching the Agent and Helm chart)
  • sets DD_APM_INSTRUMENTATION_ON_DEMAND on the Cluster Agent from that value
  • maps datadog.apm.instrumentation.onDemand in yaml-mapper

Unlike helm-charts#2868, Remote Configuration is already enabled on the Cluster Agent by default (features.remoteConfiguration.enabled=true). This change does not gate DD_REMOTE_CONFIGURATION_ENABLED.

With Operator defaults (APM, admission controller, Remote Config, and onDemand all 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 DataDog/helm-charts#2868
Follow-up to SSI on-demand RC E2E work in datadog-agent.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / cleanup
  • CI / tooling
  • Documentation

Checklist

  • Documentation updated if needed
  • Tests added or updated
  • No unintended breaking changes

How Has This Been Tested?

  • go test ./internal/controller/datadogagent/feature/apm/ ./internal/controller/datadogagent/defaults/ ./api/datadoghq/v2alpha1/
  • make generate && make manifests
  • make golden-update (Cluster Agent goldens now include DD_APM_INSTRUMENTATION_ON_DEMAND=true)

Minimum Agent Versions

  • Agent: n/a
  • Cluster Agent: 7.83.0+ (apm_config.instrumentation.on_demand / APM_POLICIES)

The Operator currently pins Cluster Agent 7.81.1. Extra env vars are ignored on older images; policies start working once the Cluster Agent image is 7.83+.

Additional Notes

Default DDA install after this PR:

  • DD_REMOTE_CONFIGURATION_ENABLED=true (already the Operator default)
  • DD_APM_INSTRUMENTATION_ENABLED=false
  • DD_APM_INSTRUMENTATION_ON_DEMAND=true

Expose instrumentation.onDemand (default true) and set
DD_APM_INSTRUMENTATION_ON_DEMAND so APM_POLICIES Remote Config
works without cluster-wide SSI, matching Helm and Agent defaults.
@datadog-official

Copy link
Copy Markdown

Code Coverage

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 50.12% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 936051e | Docs | View more details | Give us feedback!

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.

1 participant