Skip to content

Conditionally set env vars to match datadog-operator: logs, prometheus#2312

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 15 commits intomainfrom
fanny/AGENTONB-2670/harmonize-agentconf
Feb 9, 2026
Merged

Conditionally set env vars to match datadog-operator: logs, prometheus#2312
gh-worker-dd-mergequeue-cf854d[bot] merged 15 commits intomainfrom
fanny/AGENTONB-2670/harmonize-agentconf

Conversation

@fanny-jiang
Copy link
Copy Markdown
Contributor

@fanny-jiang fanny-jiang commented Jan 21, 2026

What this PR does / why we need it:

  • DD_LOGS_CONFIG_K8S_CONTAINER_USE_FILE: only set when logs.enabled=true
  • DD_PROMETHEUS_SCRAPE_SERVICE_ENDPOINTS: added to agent container to match the datadog-operator logic (before, it was only added to the cluster-agent deployment)

These changes align the datadog chart behavior with that of the datadog-operator and avoids setting env vars when they're not explicitly needed.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • All commits are signed (see: signing commits)
  • Chart Version semver bump label has been added (use <chartName>/minor-version, <chartName>/patch-version, or <chartName>/no-version-bump)
  • For datadog or datadog-operator chart or value changes, update the test baselines (run: make update-test-baselines)

GitHub CI takes care of the below, but are still required:

  • Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
  • CHANGELOG.md has been updated
  • Variables are documented in the README.md

@fanny-jiang fanny-jiang requested a review from a team as a code owner January 21, 2026 18:15
@github-actions github-actions Bot added the chart/datadog This issue or pull request is related to the datadog chart label Jan 21, 2026
@fanny-jiang fanny-jiang requested a review from a team January 21, 2026 18:24
@fanny-jiang fanny-jiang added the datadog/patch-version Patch version bump for datadog chart label Jan 21, 2026
value: {{ .Values.datadog.processAgent.containerCollection | quote }}
- name: DD_PROCESS_AGENT_DISCOVERY_ENABLED
value: {{ .Values.datadog.processAgent.processDiscovery | quote }}
{{- if and (eq .Values.datadog.processAgent.processCollection true) .Values.datadog.processAgent.stripProcessArguments }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe the operator needs updating, but we don't want to check Values.datadog.processAgent.processCollection here. Due to the newer Service Discovery feature, processes may be collected without this config set. We still want to strip args in that case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, thanks for the context! I'll revert those changes

@fanny-jiang fanny-jiang changed the title Conditionally set env vars to match datadog-operator: logs, prometheus, process agent Conditionally set env vars to match datadog-operator: logs, prometheus Jan 28, 2026
@fanny-jiang
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Feb 9, 2026

View all feedbacks in Devflow UI.

2026-02-09 19:33:23 UTC ℹ️ Start processing command /merge


2026-02-09 19:33:27 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-02-09 19:40:17 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 50m (p90).


2026-02-09 19:40:25 UTC 🚨 MergeQueue: This merge request is in error

There was an unexpected error while creating the working branch: cannot create branch DataDog/helm-charts/merge_request:{repository:{owner:"DataDog" name:"helm-charts"} queued_at:{seconds:1770666014 nanos:396772000} status_with_reason:STATUS_WITH_REASON_QUEUED priority:200 created_at:{seconds:1770665606 nanos:364511000} pull_request_number:2312 base_branch:"main" head_sha:"6af9df60bb9c5169bc185c135b7530f51149e6c8" id:"65eabb70-de55-4950-ac23-5e9847d82c1f" status:STATUS_QUEUED triggered_by:"fanny.jiang@datadoghq.com" merge_status_workflow_id:"d1c9437b-b17c-4709-9009-48eaa688f3e1_47" next_mergeability_check_at:{seconds:1770666007 nanos:670593000}} name:"mq-working-branch-main-acdbdcc" temporal_execution_workflow_id:"019c43eb-43d1-726a-82cd-97a59682638d_52" temporal_execution_run_id:"019c43eb-498c-748f-9d55-f474da88021a"

This could indicate that something doesn't work properly with the build system or that this one has reached its maximum capacity.
You can try to wait a bit and then re-add your pull request to the queue!

Details

Error: cannot create branch DataDog/helm-charts/merge_request:{repository:{owner:"DataDog" name:"helm-charts"} queued_at:{seconds:1770666014 nanos:396772000} status_with_reason:STATUS_WITH_REASON_QUEUED priority:200 created_at:{seconds:1770665606 nanos:364511000} pull_request_number:2312 base_branch:"main" head_sha:"6af9df60bb9c5169bc185c135b7530f51149e6c8" id:"65eabb70-de55-4950-ac23-5e9847d82c1f" status:STATUS_QUEUED triggered_by:"fanny.jiang@datadoghq.com" merge_status_workflow_id:"d1c9437b-b17c-4709-9009-48eaa688f3e1_47" next_mergeability_check_at:{seconds:1770666007 nanos:670593000}} name:"mq-working-branch-main-acdbdcc" temporal_execution_workflow_id:"019c43eb-43d1-726a-82cd-97a59682638d_52" temporal_execution_run_id:"019c43eb-498c-748f-9d55-f474da88021a"

FullStacktrace:
child workflow execution error (type: mergequeue_private.MergeQueue_BuildWorkingBranch, workflowID: 019c43eb-43d1-726a-82cd-97a59682638d_52, runID: 019c43eb-498c-748f-9d55-f474da88021a, initiatedEventID: 52, startedEventID: 53): cannot create branch DataDog/helm-charts/merge_request:{repository:{owner:"DataDog" name:"helm-charts"} queued_at:{seconds:1770666014 nanos:396772000} status_with_reason:STATUS_WITH_REASON_QUEUED priority:200 created_at:{seconds:1770665606 nanos:364511000} pull_request_number:2312 base_branch:"main" head_sha:"6af9df60bb9c5169bc185c135b7530f51149e6c8" id:"65eabb70-de55-4950-ac23-5e9847d82c1f" status:STATUS_QUEUED triggered_by:"fanny.jiang@datadoghq.com" merge_status_workflow_id:"d1c9437b-b17c-4709-9009-48eaa688f3e1_47" next_mergeability_check_at:{seconds:1770666007 nanos:670593000}} name:"mq-working-branch-main-acdbdcc" temporal_execution_workflow_id:"019c43eb-43d1-726a-82cd-97a59682638d_52" temporal_execution_run_id:"019c43eb-498c-748f-9d55-f474da88021a" (type: MergeQueueError, retryable: false): activity error (type: github.GithubService_CreateRefFromSha, scheduledEventID: 20, startedEventID: 21, identity: 1@github-worker-6ffbddb8b-xj5s6@): cannot create new ref using the github API: PATCH https://api.github.com/repos/DataDog/helm-charts/git/refs/heads/mq-working-branch-main-acdbdcc: 422 Reference does not exist [] (Request ID: CA5C:263C8A:17AFCA2:6532929:698A3824) (type: GitUnprocessableEntity, retryable: false): PATCH https://api.github.com/repos/DataDog/helm-charts/git/refs/heads/mq-working-branch-main-acdbdcc: 422 Reference does not exist [] (type: ErrorResponse, retryable: true)

@fanny-jiang
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Feb 9, 2026

View all feedbacks in Devflow UI.

2026-02-09 21:28:05 UTC ℹ️ Start processing command /merge


2026-02-09 21:28:11 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 50m (p90).


2026-02-09 22:09:04 UTC ℹ️ MergeQueue: This merge request was merged

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 datadog/patch-version Patch version bump for datadog chart mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants