← Back to Pull requests

[BYOCAPM-159] Add DatadogBYOCCluster spec.signal for traces clusters #3576

Closed
unknown closed this pull request without merging on Oct 21, 2026 14:08 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 20:54 UTC
Author

Why

A BYOC APM cluster needs CloudPrem's traces index, but the operator's default node config hardcodes create_dd_traces_index: false. Today that means hand-writing nodeConfigOverrides. This lets a DatadogBYOCCluster declare the signal it stores instead. A BYOC cluster stores one signal: customers run one traces cluster next to their logs clusters.

Intent and context: BYOCAPM-159

What changed

  • New optional spec.signal on DatadogBYOCCluster: logs | traces, default logs. Kubebuilder enum + default markers only, no CEL (validation stays in the reconciler, per the #3501 review). Named after the CloudPrem Helm chart's signals.

  • The index flags moved out of the default node config and are set from the signal: logs → create_dd_logs_index: true, create_dd_traces_index: false; traces → the reverse. Both keys are always written, because CloudPrem treats a missing create_dd_logs_index as true. They're applied before nodeConfigOverrides, so a user override still wins.

  • Generated deepcopy/openapi/CRD files are mechanical.
  • Impact

  • Logs clusters (no signal, or signal: logs) render the same node config as today.

  • A traces cluster no longer creates the logs index.

  • Not in this PR: making spec.signal immutable (BYOCAPM-160). For now, switching an existing cluster's signal is not blocked.
  • Test plan

  • Unit (TestBuildResources_ConfigMap, full node config compared): default and logs → logs true / traces false; traces → logs false / traces true; traces + override → override wins

  • make generate && make manifests clean

  • Traces index observed on a real EKS cluster, on the pre-review code (see below)

  • Re-run on EKS after the review changes: traces cluster creates datadog-spans and no datadog logs index; spec.signal schema
  • EKS test (2026-10-12)

    [!NOTE]

    This ran before the review changes, when the field was still spec.type and a traces cluster also created the logs index. A re-run on the current code is pending.

    Ran a local build of this PR merged with #3562 (the controller) against EKS byoc-apm-cluster in the BYOC APM dev AWS account, connected to the datad0g BYOC APM staging org. Full write-up with manifests, evidence and observations: https://chonk.us1.prod.dog/v3/francisco.paulo/byoc-pr-3576-eks-traces-test.html (AppGate).

    Summary of the steps:
    1. Installed only the two BYOC CRDs (no make install, which would overwrite the cluster's Helm-managed DatadogAgent CRD).
    2. Isolated the test from the existing Helm-based BYOC APM setup in the same cluster: own namespace, a temporary tainted node group, a throwaway Postgres metastore, and a separate S3 prefix.
    3. Ran the operator out of cluster, watching only the test namespace, with the Agent controller off.
    4. Applied a DatadogBYOCCluster with type: traces (now signal: traces), site: datad0g.com, and CloudPrem cp-rc-v0.1.34.

    | Check | Result |
    |---|---|
    | Rendered node config | create_dd_traces_index: true ✅ |
    | Reconcile | Reconciled and Available conditions True, all CloudPrem pods ready ✅ |
    | Traces index | CloudPrem logged creating Datadog traces index 'datadog-spans'; index list includes datadog-spans ✅ |
    | Datadog | Cluster shows as Connected (reverse connection) in the staging org ✅ |
    | traces → logs → traces (field now signal) | Config flips to false and back, pods roll ✅ |
    | type: foo (now signal) | Rejected: Unsupported value: "foo": supported values: "logs", "traces" ✅ |
    | Existing setup in the cluster | Unaffected ✅ |

    Not covered: spans end to end (the operator can't create a traces OP Worker yet), and type immutability (BYOCAPM-160).

    [BYOCAPM-159]: https://datadoghq.atlassian.net/browse/BYOCAPM-159?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
    [BYOCAPM-160]: https://datadoghq.atlassian.net/browse/BYOCAPM-160?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 515 lines (+386 / -129) across 6 files Reviewer: fpddog Review duration: 18313m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 515 lines diff across 6 files
    0.48
    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%
    60%
    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.374
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3576"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 47.7% (MEDIUM) · Higher = larger blast radius
    47.7%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 18.8% · Safe to merge
    18.8%