Allow specifying additional deployment labels - #2877
Conversation
There was a problem hiding this comment.
💡 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".
| {{- if .Values.deployment.additionalLabels }} | ||
| {{ toYaml .Values.deployment.additionalLabels }} |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
This was a good point, removed from datadog-operator.labels and added to operator Deployment resource.
6ee0abd to
d43481e
Compare
Signed-off-by: Josh Ferrell <josh.ferrell@gmail.com>
d43481e to
ef72c0c
Compare
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
<chartName>/minor-version,<chartName>/patch-version, or<chartName>/no-version-bump)datadogordatadog-operatorchart or value changes, update the test baselines (run:make update-test-baselines)GitHub CI takes care of the below, but are still required:
.github/helm-docs.sh)CHANGELOG.mdhas been updatedREADME.md