Skip to content

feat(datadog): enable cluster-agent RC for on-demand SSI - #2868

Draft
iamluc wants to merge 1 commit into
mainfrom
luc/ssi-on-demand-rc-cluster-agent
Draft

feat(datadog): enable cluster-agent RC for on-demand SSI#2868
iamluc wants to merge 1 commit into
mainfrom
luc/ssi-on-demand-rc-cluster-agent

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 Helm chart did not enable Remote Configuration
on the cluster-agent unless clusterAgent.admissionController.remoteInstrumentation
(or a few other unrelated features) was enabled.

This PR:

  • exposes datadog.apm.instrumentation.onDemand (default true, matching the agent)
  • sets DD_APM_INSTRUMENTATION_ON_DEMAND on the cluster-agent from that value
  • updates clusterAgent-remoteConfiguration-enabled to return true when the
    admission controller is enabled and on-demand SSI is on

With chart defaults (remoteConfiguration.enabled, admissionController.enabled,
and onDemand all true), the cluster-agent polls Remote Config without requiring
remoteInstrumentation.enabled.

Related Issue

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?

  • make update-test-baselines-datadog-agent (baseline manifests updated)
  • .github/helm-docs.sh

Additional Notes

This changes default cluster-agent installs to set DD_REMOTE_CONFIGURATION_ENABLED=true
when admission controller + onDemand are enabled (both default to true). Expected
side effect: cluster-agent starts polling RC in more default installs.

Related datadog-agent E2E PR can drop its DD_REMOTE_CONFIGURATION_ENABLED workaround
once this chart version is published and pinned in the E2E framework.

Expose onDemand in chart values and gate DD_REMOTE_CONFIGURATION_ENABLED
on the admission controller with on-demand instrumentation enabled, so
APM_POLICIES Remote Config rules work without remoteInstrumentation.
@iamluc iamluc added bug Something isn't working datadog/patch-version Patch version bump for datadog chart labels Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ GKE Autopilot / GDC Baseline Manifests Changed

This PR modifies GKE Autopilot or GDC baseline manifest snapshots. Before merging, confirm:

  • GKE Autopilot/GKE GDC baseline manifest diffs have been reviewed and confirmed to be supported in GKE Autopilot and the latest Datadog WorkloadAllowlist.

If changes introduce constraints not yet covered by the Datadog WorkloadAllowlist CR, gate them with {{- if not (or .Values.providers.gke.autopilot .Values.providers.gke.gdc) }} until the WorkloadAllowlist is updated.
See gke-constraints-review-guide.md for the full constraint reference.

@github-actions github-actions Bot added the chart/datadog This issue or pull request is related to the datadog chart label Aug 19, 2026
@iamluc iamluc changed the title fix(datadog): enable cluster-agent RC for on-demand SSI feat(datadog): enable cluster-agent RC for on-demand SSI Aug 27, 2026
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/datadog-agent that referenced this pull request Aug 28, 2026
…55057)

### What does this PR do?

Expands `TestSSISuite/TestRemoteConfig` so APM_POLICIES is exercised end-to-end against three workloads (helm target, annotated lib-injection, unannotated) and three RC documents:

- **Host-only policy** does not match Kubernetes admission facts: annotated pod stays `k8s_lib_injection`, unannotated stays uninjected, helm target still gets SSI (`applied-target=python-apps`).
- **Namespace policy** (`NAMESPACE_NAME=other`) enables SSI outside the helm target, including true on-demand on the unannotated pod (`applied-policy` set). Helm fallback is unchanged.
- **Deny policy** matching `targeted-namespace` overrides the local helm target (no injection, no `applied-target`). Namespace `other` is unchanged.

Cluster-agent RC on the published chart is enabled via `remoteInstrumentation.enabled` (temporary until [helm-charts#2868](DataDog/helm-charts#2868)). Extra cluster-agent env uses `envDict` so fakeintake RC settings are not replaced.

Stacked on #55019.

### Motivation

Catch the SSI false-positive (host-only RC flipping annotated pods), prove on-demand SSI from RC, and prove remote-before-local override — none of which unit tests cover through fakeintake + admission.

### Describe how you validated your changes

- [x] Local kind-local: `dda inv new-e2e-tests.run --targets=./tests/ssi --run='TestSSISuite/TestRemoteConfig'`
- [ ] CI `new-e2e-ssi` job

### Additional Notes

`remoteInstrumentation.enabled` is only the published-chart RC gate, not the feature under test. Drop it once helm-charts#2868 is released.

Co-authored-by: luc.vieillescazes <luc.vieillescazes@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chart/datadog This issue or pull request is related to the datadog chart datadog/patch-version Patch version bump for datadog chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant