fix(otel-agent): use unique otelconfPath on Windows to avoid duplicate volumeMount - #2746
fix(otel-agent): use unique otelconfPath on Windows to avoid duplicate volumeMount#2746dudo wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70e70ba7f8
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {{- end -}} | ||
| {{- if eq .Values.targetSystem "windows" -}} | ||
| C:/ProgramData/Datadog | ||
| C:/ProgramData/Datadog/otel-agent |
There was a problem hiding this comment.
Add the required chart release artifacts
The project review guide at charts/datadog/docs/internal/agent-review-guide.md says changes to chart templates or chart behavior require a charts/datadog/Chart.yaml version bump, charts/datadog/CHANGELOG.md entry, README regeneration, and updated Datadog Agent baselines. This commit only changes _helpers.tpl, so the Windows DDOT fix can be merged without the release metadata/test artifacts needed for it to be published and verified with the chart.
Useful? React with 👍 / 👎.
The datadog.otelconfPath template resolves to C:/ProgramData/Datadog on Windows, identical to datadog.confPath. This causes the otel-agent container to have two volumeMounts at the same mountPath, which Kubernetes rejects: mountPath must be unique. Uses C:/ProgramData/Datadog/otel-agent instead, matching the Linux pattern where confPath (/etc/datadog-agent) and otelconfPath (/etc/otel-agent) are distinct directories.
70e70ba to
630ecd4
Compare
What does this PR do?
Fixes the
datadog.otelconfPathHelm template to use a unique directory on Windows (C:/ProgramData/Datadog/otel-agent) instead of the same path asdatadog.confPath(C:/ProgramData/Datadog).Motivation
When
datadog.otelCollector.enabled=truewithtargetSystem=windows, the rendered DaemonSet has two volumeMounts on the otel-agent container pointing to the samemountPath:Kubernetes rejects this:
This makes it impossible to deploy DDOT on Windows via the Helm chart.
Reproducer
The fix
On Linux, these paths are already distinct (
/etc/datadog-agentvs/etc/otel-agent). This PR applies the same pattern on Windows:datadog.confPath(windows)C:/ProgramData/Datadogdatadog.otelconfPath(windows)C:/ProgramData/DatadogC:/ProgramData/Datadog/otel-agent