feat(csi): expose APM registry allow list #3543
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
adel121
What does this PR do?
Adds
spec.features.admissionController.registryAllowListto theDatadogAgent. When the list is not empty: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.DatadogCSIDriveras the newspec.apm.registryAllowListfield. The CSI controller setsDD_REGISTRY_ALLOW_LISTon the CSI driver container.spec.apm.registryAllowListcan also be set directly on a standaloneDatadogCSIDriver.Motivation
INPLAT-1005. This matches
global.apmRegistryAllowListin the Helm chart (helm-charts#2488), which configures both the Cluster Agent and the CSI driver from one value.Additional Notes
features.admissionController, notfeatures.apm.instrumentation. The Cluster Agent enforces the list for every library injection, not only SSI. It also sits next tofeatures.admissionController.registry.DatadogAgentProfiledoes not allowadmissionController, so there is no profile merge to handle.DatadogLibraryCSI volumes without the webhook.DD_REGISTRY_ALLOW_LISTandDD_APM_REGISTRY_AUTH_<n>, so the CSI controller no longer skips them on Autopilot. This also enables APM pull secrets on Autopilot. Users withcsiDriverImage.pullSecretswill now getDD_APM_REGISTRY_AUTH_0(optional). This matches helm-charts#2939.zz_generated.openapi.gowas regenerated withGOTOOLCHAIN=go1.26.7.openapi-genfails to parse the standard library with Go 1.27.Minimum Agent Versions
Agent: N/A
Cluster Agent: v7.80.0
Describe your test plan
- admission controller feature: env var set for a non-empty list, absent for an empty list;
-
DatadogCSIDriverbuilt from the DDA: list propagated, works withglobal.csi.apm.pullSecrets, no aliasing with the DDA;- CSI DaemonSet:
DD_REGISTRY_ALLOW_LISTandDD_APM_REGISTRY_AUTH_<n>present, including on GKE Autopilot;DD_REGISTRY_ALLOW_LISTabsent with no APM config or an empty list;- CSI AllowlistSynchronizer lists v1.1.1 and v1.1.2.
go test ./...andmake lintpass.DatadogAgentwithfeatures.admissionController.registryAllowList: [gcr.io/datadoghq]and the operator-managed CSI driver, then check both env vars and that injection from another registry is blocked.csimode, a private Artifact Registry asadmissionController.registryandregistryAllowList):- the AllowlistSynchronizer lists v1.1.1 and v1.1.2, and the CSI DaemonSet is admitted with
DD_REGISTRY_ALLOW_LISTandDD_APM_REGISTRY_AUTH_0;- without
global.csi.apm.pullSecrets, the CSI mount fails withDENIED: Unauthenticated request;- with a pull secret, the injector and
ddtraceare loaded in the app pod;- a library from
gcr.io/datadoghqis rejected by the Cluster Agent (not in the allow list), and a directDatadogLibraryCSI volume fromgcr.io/datadoghqis rejected by the CSI driver.Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel[1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
[INPLAT-1005]: https://datadoghq.atlassian.net/browse/INPLAT-1005?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ