[INPLAT-1004]: expose registry allow list for DatadogLibrary volumes#2488
[INPLAT-1004]: expose registry allow list for DatadogLibrary volumes#2488
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1be5d96510
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
701d911 to
b970c9e
Compare
Adds apm.registryAllowList to the Helm chart, passed to the driver as DD_REGISTRY_ALLOW_LIST. When set, restricts which container registries can be used as sources for DatadogLibrary CSI volumes. Defaults to empty (all registries allowed). Bumps chart to v0.10.0. Replaces baseline snapshot test with targeted env var assertions using values files, covering non-empty, empty, and undefined list cases.
Template the datadog-csi-driver.apm.registryAllowList value as DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_CSI_REGISTRY_ALLOW_LIST on the cluster-agent deployment. This allows the admission webhook to skip adding CSI volumes for libraries from disallowed registries.
f3ea8cc to
2c6d5e2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c6d5e2b60
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
0.10.0 is not yet published to the Helm repo; bumping the dependency here breaks helm dependency build in CI. The bump will follow in a separate PR once this chart is released.
The registry allow list is now enforced by the cluster-agent admission controller for all injection modes (init container, image volume, CSI). Move the configuration to clusterAgent.admissionController.containerRegistryAllowList and update the env var to DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_CONTAINER_REGISTRY_ALLOW_LIST.
Use global.containerRegistryAllowList as a single config point that configures both the cluster-agent admission webhook and the CSI driver. The webhook skips mutation for blocked registries; the CSI driver independently enforces the same list via DD_REGISTRY_ALLOW_LIST. Bump bundled datadog-csi-driver sub-chart to 0.10.0.
When the datadog-csi-driver chart is rendered standalone (not as a sub-chart of the datadog chart), .Values.global is nil. The template was accessing .Values.global.containerRegistryAllowList on a nil map, causing a template rendering error. Add global.containerRegistryAllowList: [] to values.yaml so that the global key always exists with a safe default. This fixes the CI baseline tests that render the chart directly.
|
@iamluc seems related to what you are working on ? Could you please have a look 🙇 |
Summary
apm.registryAllowListto thedatadog-csi-driverHelm chartDD_REGISTRY_ALLOW_LIST(comma-joined), restricting which container registries can be used as sources for DatadogLibrary CSI volumes0.10.0Test plan
TestRegistryAllowListverifiesDD_REGISTRY_ALLOW_LISTis set correctly whenregistryAllowListis non-emptyTestRegistryAllowListverifiesDD_REGISTRY_ALLOW_LISTis absent whenregistryAllowListis explicitly set to[](via values file)TestRegistryAllowListverifiesDD_REGISTRY_ALLOW_LISTis absent whenregistryAllowListis undefined (no values file)Closes INPLAT-1004