← Back to Pull requests

[CASCL-1397] process: extend Cluster with `dd-cluster-info` data #483

Open
L3n41c opened this pull request with 460 lines diff across 5 files
View on GitHub
L3n41c L3n41c commented on May 20, 2026 15:59 UTC
Author

What does this PR do?

Companion PRs:

- DataDog/datadog-agent#51107 — orchestrator check populates and emits the new fields.

- DataDog/helm-charts#2677 — grants the Cluster Agent the RBAC needed to read the ConfigMap.

Extends the Cluster and ClusterNodeInfo protobuf messages in proto/process/agent.proto to carry data sourced from the dd-cluster-info ConfigMap that kubectl datadog autoscaling cluster install writes at the end of its install flow.

Per-node fields on ClusterNodeInfo (12–14):

  • nodeManager (string): fargate | karpenter | eksManagedNodeGroup | asg | standalone | unknown

  • nodeManagerName (string): name of the managing entity (NodePool, ASG, Fargate profile, …)

  • nodeManagerManagedByDatadog (bool)
  • Cluster-wide fields on Cluster (17–19):

  • AutoscalingInfo autoscaling — wraps ClusterAutoscalerInfo, KarpenterInfo, EKSAutoModeInfo

  • int64 clusterInfoGeneratedAtUnixNano — timestamp of the ConfigMap snapshot

  • oneof cloudResourceId { string arn = 19; } — AWS EKS cluster ARN; the oneof keeps room for gkeResourceName / azureResourceId later
  • The generated Go code in process/agent.pb.go and process/agent.proto_builder.go is regenerated via dda inv codegen.all.

    Motivation

    Jira: CASCL-1397 (parent epic CASCL-920).

    Follow-up to CASCL-1304 (datadog-operator PRs #2945, #2980) which introduced the dd-cluster-info ConfigMap. Until now this snapshot is consumed only by future migration tooling; this PR — together with the orchestrator-check change in DataDog/datadog-agent#51107 — makes the data flow to the Datadog back-end through the orchestrator check's synthetic Cluster object.

    Additional Notes

  • Field numbers chosen to extend the existing Cluster (16 fields) and ClusterNodeInfo (11 fields) without renumbering anything.

  • clusterName and region from dd-cluster-info are intentionally not added: they already exist in CollectorCluster.clusterName and per-node ClusterNodeInfo.region. The Agent will validate consistency and warn on mismatch.

  • clusterArn is wrapped in oneof cloudResourceId rather than added as a top-level string, so GKE/AKS equivalents fit later without bloat.
  • Possible Drawbacks / Trade-offs

  • All additions are optional proto3 fields, so the change is forward-compatible on the wire. Old consumers will ignore the new fields; new producers will leave them unset when the ConfigMap is absent.

  • The back-end orchestrator pipeline will need a follow-up to surface the new fields in the UI — out of scope for this repo.
  • Describe how to test/QA your changes

  • dda inv codegen.all regenerates the Go bindings cleanly from the proto.

  • go test ./process/... passes locally with the regenerated code.

  • The companion PR DataDog/datadog-agent#51107 populates the new fields and is exercised against a real EKS cluster with kubectl datadog autoscaling cluster install deployed.
  • Reviewer's Checklist

    Reviewers: please see the review guidelines.

    [CASCL-1397]: https://datadoghq.atlassian.net/browse/CASCL-1397?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 460 lines (+345 / -115) across 5 files Reviewer: None requested Review duration: 286810m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.65) × (1 − Review Confidence (0.42)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 460 lines diff across 5 files
    0.65
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    42%
    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.367
    Shallow Review Depth shallow_review_depth
    0.344
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #483"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    L3n41c L3n41c
    Labels
    risk: medium confidence: 42.2% 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: 64.5% (MEDIUM) · Higher = larger blast radius
    64.5%
    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: 42.2% · Lower = rushed or shallow review
    42.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: 37.3% · Moderate risk
    37.3%