Skip to content

Allow specifying additional deployment labels - #2877

Open
josh-ferrell wants to merge 1 commit into
DataDog:mainfrom
josh-ferrell:feat/datadog-operator-additional-labels
Open

Allow specifying additional deployment labels#2877
josh-ferrell wants to merge 1 commit into
DataDog:mainfrom
josh-ferrell:feat/datadog-operator-additional-labels

Conversation

@josh-ferrell

@josh-ferrell josh-ferrell commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Allows the end user to configure additional labels in the datadog-operator deployment. This is helpful when you want to utilize kube state metrics within Datadog that require tags.datadoghq.com/* labels on the deployment resources.

Which issue this PR fixes

Support Ticket 2993236

Special notes for your reviewer:

Checklist

  • All commits are signed and show as "Verified" on GitHub (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

@josh-ferrell
josh-ferrell requested review from a team as code owners August 25, 2026 13:34

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

Copy link
Copy Markdown

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: 6ee0abd628

ℹ️ 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".

Comment on lines +45 to +46
{{- if .Values.deployment.additionalLabels }}
{{ toYaml .Values.deployment.additionalLabels }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply deployment labels only to the Deployment

When deployment.additionalLabels is nonempty, placing it in the common datadog-operator.labels helper also adds those labels to the ServiceAccount, ClusterRole, and PodDisruptionBudget, because service_account.yaml, clusterrole.yaml, and pod_disruption_budget.yaml all include this helper. Labels intended for Deployment-specific tagging or policy selection can therefore unexpectedly select unrelated resources; render this value directly in deployment.yaml instead.

Useful? React with 👍 / 👎.

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.

This was a good point, removed from datadog-operator.labels and added to operator Deployment resource.

@josh-ferrell
josh-ferrell force-pushed the feat/datadog-operator-additional-labels branch from 6ee0abd to d43481e Compare August 25, 2026 13:38
Signed-off-by: Josh Ferrell <josh.ferrell@gmail.com>
@josh-ferrell
josh-ferrell force-pushed the feat/datadog-operator-additional-labels branch from d43481e to ef72c0c Compare August 25, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant