← Back to Pull requests

Support additional Cluster Agent Remote Configuration clients #55618

Closed
unknown closed this pull request without merging on Oct 16, 2026 09:24 UTC
View on GitHub
unknown unknown commented on Aug 29, 2026 00:33 UTC
Author

What does this PR do?

Allows the Cluster Agent to run several Remote Configuration clients in one process, each with its own endpoint, API key, TUF roots and cache database.

An additional client is named after the subsystem it serves, which selects the RC products it owns — autoscaling, kubeactions, private_action_runner or apm_instrumentation:

cluster_agent:
  remote_configuration:
    additional_clients:
      autoscaling:
        rc_dd_url: https://config.datacat.com
        site: datacat.com
        api_key: ENC[k8s_secret@datadog/datadog-secret/datacat-api-key]

Products no client claims stay on the default client and the default cache, so existing deployments are unaffected. Clients are built lazily, only once a product they own is requested.

The setting is not published in the generated datadog.yaml documentation: it exists for testing the Cluster Agent against a second backend, not for customer configuration.

Motivation

The Cluster Agent assumed a single Remote Configuration client per process, which made endpoint and API key ownership process wide: every service watched the top-level api_key, status expvars were shared, and instances would have reused the same cache database.

Running autoscaling against a different Remote Configuration backend than the rest of the Cluster Agent requires those resources to be per-instance.

Describe how you validated your changes

Unit tests covering spec parsing and validation, product routing, lazy client creation, per-instance status and API key isolation.

Also validated end to end on a local kind cluster, with the autoscaling client pointed at a second Remote Configuration backend while the default client stayed on production: both clients authenticated independently, kept separate cache databases, and the autoscaling client received live configuration.

Additional Notes

Configuration that cannot work is rejected at startup rather than degrading quietly: an unknown client name, a cache filename that is not a basename or that collides with another client's, and products used by one subsystem split across two clients.

Stacked below #55619, which reports these clients in datadog-cluster-agent status.

🤖 PR description and code assisted by Claude:claude-opus-5

Diff: 286 lines (+214 / -72) across 3 files Reviewer: clamoriniere Review duration: 69650m
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.63) × (1 − Review Confidence (0.54)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 286 lines diff across 3 files
0.63
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
54%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.339
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #55618"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 54.2% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 63.0% (MEDIUM) · Higher = larger blast radius
63.0%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 54.2% · Lower = rushed or shallow review
54.2%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 28.8% · Safe to merge
28.8%