Skip to content

[INPLAT-1004]: expose registry allow list for DatadogLibrary volumes#2488

Open
knusbaum wants to merge 9 commits intomainfrom
knusbaum/csi-driver-registry-allow-list
Open

[INPLAT-1004]: expose registry allow list for DatadogLibrary volumes#2488
knusbaum wants to merge 9 commits intomainfrom
knusbaum/csi-driver-registry-allow-list

Conversation

@knusbaum
Copy link
Copy Markdown
Contributor

@knusbaum knusbaum commented Mar 17, 2026

Summary

  • Adds apm.registryAllowList to the datadog-csi-driver Helm chart
  • When set, the value is passed to the driver container as DD_REGISTRY_ALLOW_LIST (comma-joined), restricting which container registries can be used as sources for DatadogLibrary CSI volumes
  • Defaults to empty list (all registries allowed, preserving backward compatibility)
  • Bumps chart version to 0.10.0

Test plan

  • TestRegistryAllowList verifies DD_REGISTRY_ALLOW_LIST is set correctly when registryAllowList is non-empty
  • TestRegistryAllowList verifies DD_REGISTRY_ALLOW_LIST is absent when registryAllowList is explicitly set to [] (via values file)
  • TestRegistryAllowList verifies DD_REGISTRY_ALLOW_LIST is absent when registryAllowList is undefined (no values file)
  • All existing baseline tests continue to pass

Closes INPLAT-1004

@knusbaum knusbaum requested review from a team as code owners March 17, 2026 21:29
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@knusbaum knusbaum marked this pull request as draft March 17, 2026 21:53
@knusbaum knusbaum changed the title feat(datadog-csi-driver): expose registry allow list for DatadogLibrary volumes [INPLAT-1004]: expose registry allow list for DatadogLibrary volumes Mar 17, 2026
@knusbaum knusbaum force-pushed the knusbaum/csi-driver-registry-allow-list branch 2 times, most recently from 701d911 to b970c9e Compare March 17, 2026 23:05
@github-actions github-actions bot added the chart/datadog This issue or pull request is related to the datadog chart label Mar 18, 2026
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.
@knusbaum knusbaum force-pushed the knusbaum/csi-driver-registry-allow-list branch from f3ea8cc to 2c6d5e2 Compare March 19, 2026 13:17
@knusbaum knusbaum marked this pull request as ready for review March 19, 2026 13:20
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.
@adel121
Copy link
Copy Markdown
Contributor

adel121 commented Mar 30, 2026

@iamluc seems related to what you are working on ?

Could you please have a look 🙇

Copy link
Copy Markdown
Contributor

@iamluc iamluc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart/datadog This issue or pull request is related to the datadog chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants