← Back to Pull requests

feat(csi): expose APM registry allow list #3543

Closed
unknown closed this pull request without merging on Oct 12, 2026 17:13 UTC
View on GitHub
unknown unknown commented on Oct 02, 2026 08:54 UTC
Author

What does this PR do?

Adds spec.features.admissionController.registryAllowList to the DatadogAgent. When the list is not empty:

  • The Cluster Agent gets DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_CONTAINER_REGISTRY_ALLOW_LIST (comma-separated). The admission webhook then only injects APM libraries from these registries, for all injection modes.

  • The list is copied to the managed DatadogCSIDriver as the new spec.apm.registryAllowList field. The CSI controller sets DD_REGISTRY_ALLOW_LIST on the CSI driver container.
  • spec.apm.registryAllowList can also be set directly on a standalone DatadogCSIDriver.

    Motivation

    INPLAT-1005. This matches global.apmRegistryAllowList in the Helm chart (helm-charts#2488), which configures both the Cluster Agent and the CSI driver from one value.

    Additional Notes

  • The field lives under features.admissionController, not features.apm.instrumentation. The Cluster Agent enforces the list for every library injection, not only SSI. It also sits next to features.admissionController.registry. DatadogAgentProfile does not allow admissionController, so there is no profile merge to handle.

  • The list is passed to the CSI driver even when the admission controller is disabled, like in Helm. Pods can request DatadogLibrary CSI volumes without the webhook.

  • GKE Autopilot: the default CSI WorkloadAllowlist moves to v1.1.2, and the synchronizer keeps v1.1.1. v1.1.2 allows DD_REGISTRY_ALLOW_LIST and DD_APM_REGISTRY_AUTH_<n>, so the CSI controller no longer skips them on Autopilot. This also enables APM pull secrets on Autopilot. Users with csiDriverImage.pullSecrets will now get DD_APM_REGISTRY_AUTH_0 (optional). This matches helm-charts#2939.

  • zz_generated.openapi.go was regenerated with GOTOOLCHAIN=go1.26.7. openapi-gen fails to parse the standard library with Go 1.27.
  • Minimum Agent Versions

    Agent: N/A
    Cluster Agent: v7.80.0

  • Datadog CSI Driver: v1.3.0 (operator default is 1.4.0)
  • Describe your test plan

  • Unit tests:

  • - admission controller feature: env var set for a non-empty list, absent for an empty list;
    - DatadogCSIDriver built from the DDA: list propagated, works with global.csi.apm.pullSecrets, no aliasing with the DDA;
    - CSI DaemonSet: DD_REGISTRY_ALLOW_LIST and DD_APM_REGISTRY_AUTH_<n> present, including on GKE Autopilot; DD_REGISTRY_ALLOW_LIST absent with no APM config or an empty list;
    - CSI AllowlistSynchronizer lists v1.1.1 and v1.1.2.
  • go test ./... and make lint pass.

  • Manual: deploy a DatadogAgent with features.admissionController.registryAllowList: [gcr.io/datadoghq] and the operator-managed CSI driver, then check both env vars and that injection from another registry is blocked.

  • Manual on GKE Autopilot (operator from this branch, SSI in csi mode, a private Artifact Registry as admissionController.registry and registryAllowList):

  • - the AllowlistSynchronizer lists v1.1.1 and v1.1.2, and the CSI DaemonSet is admitted with DD_REGISTRY_ALLOW_LIST and DD_APM_REGISTRY_AUTH_0;
    - without global.csi.apm.pullSecrets, the CSI mount fails with DENIED: Unauthenticated request;
    - with a pull secret, the injector and ddtrace are loaded in the app pod;
    - a library from gcr.io/datadoghq is rejected by the Cluster Agent (not in the allow list), and a direct DatadogLibrary CSI volume from gcr.io/datadoghq is rejected by the CSI driver.

    Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies

  • PR has a milestone or the qa/skip-qa label

  • All commits are signed (see: [signing commits][1])
  • [1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

    [INPLAT-1005]: https://datadoghq.atlassian.net/browse/INPLAT-1005?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 515 lines (+386 / -129) across 6 files Reviewer: adel121 Review duration: 14898m
    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 #3543"
    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%