Fix YAML mapper for helm2dda for Helm's configmap based configurations - #3373
Open
mrdoggopat wants to merge 4 commits into
Open
Fix YAML mapper for helm2dda for Helm's configmap based configurations#3373mrdoggopat wants to merge 4 commits into
mrdoggopat wants to merge 4 commits into
Conversation
datadog.otelCollector.config and clusterAgent.confd|
🎯 Code Coverage (details) 🔗 Commit SHA: c4401df | Docs | View more details | Give us feedback! |
mrdoggopat
marked this pull request as ready for review
August 19, 2026 20:37
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fed1d28e9
ℹ️ 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".
mrdoggopat
added a commit
that referenced
this pull request
Aug 19, 2026
Allowing any multi-key table through the fallback (added to support agents.customAgentConfig/clusterAgent.datadog_cluster_yaml) let it also apply to plain string/list destinations like agents.podSecurity.seLinuxContext, which have separate leaf mappings for their sub-fields. That produced invalid duplicate/extra fields in the output. Now the multi-key fallback only fires for mapFunc-based destinations (e.g. mapCustomConfigFile), matching Codex review feedback on PR #3373. Co-authored-by: Cursor <cursoragent@cursor.com>
Allowing any multi-key table through the fallback (added to support agents.customAgentConfig/clusterAgent.datadog_cluster_yaml) let it also apply to plain string/list destinations like agents.podSecurity.seLinuxContext, which have separate leaf mappings for their sub-fields. That produced invalid duplicate/extra fields in the output. Now the multi-key fallback only fires for mapFunc-based destinations (e.g. mapCustomConfigFile), matching Codex review feedback on PR #3373. Co-authored-by: Cursor <cursoragent@cursor.com>
mrdoggopat
force-pushed
the
mrmcpat-fix-yaml-mapper-otel-confd-mapping-for-helm2dda
branch
from
August 19, 2026 21:04
322168e to
e47fbeb
Compare
Mathew-Estafanous
approved these changes
Aug 19, 2026
Mathew-Estafanous
left a comment
Contributor
There was a problem hiding this comment.
Changes look good based on my limited (zero) experience of helm2dda
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the following issues when the
helm2ddaflag is run for the Datadog Plugin forkubectl.When using
datadog.otelCollector.configin Helm like:As a result, the mappings come out with three duplicate entries which the latter two are invalid:
In addition, using
clusterAgent.confdlike:As a result, the mappings for
extraConfdare missing theconfigDataMaplike:datadog.confdis unaffected.In addition,
agents.customAgentConfigandclusterAgent.datadog_cluster_yamldoes not render in the generated DatadogAgent at all and errors out with:Motivation
CONS-8504
Additional Notes
Some things to flag which was not covered in this PR:
clusterAgent.advancedConfdis also broken as it would render something like the following which isn't valid:clusterAgent.advancedConfdwould belong here as it does not have a corresponding configuration in theDatadogAgentCR so not sure if we should also make this an empty string: https://github.com/DataDog/datadog-operator/blob/main/cmd/yaml-mapper/mapper/mapping_datadog_helm_to_datadogagent_crd.yaml#L180Despite my changes rendering the DatadogAgent CR properly, it still produced these phantom errors (first error might be expected as there is no equivalent in the DatadogAgent):
Describe your test plan
Tested changes locally with the following values.yaml:
Then run the
helm2ddaflag with:Desired Output:
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel