Skip to content

Commit

Permalink
[CONTP-679] Fix bug in dca rbac generation for annotations and labels…
Browse files Browse the repository at this point in the history
… as tags: use deepcopy before merging (#1719)

* Fix bug in dca rbac generation for annotations and labels as tags: use deepcopy of dicts when merging

* bump chart version and add changelog

* update chart version everywhere
  • Loading branch information
adel121 authored Feb 27, 2025
1 parent 19ce2bc commit 643aedf
Show file tree
Hide file tree
Showing 12 changed files with 2,693 additions and 2,739 deletions.
32 changes: 18 additions & 14 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Datadog changelog

## 3.98.1

* Fixes bug that causes `DD_KUBERNETES_ANNOTATIONS_AS_TAGS` env var to be incorrectly set to the merged value of `.Values.datadog.kubernetesResourcesLabelsAsTags` and `.Values.datadog.kubernetesResourcesAnnotationsAsTags`.

## 3.98.0

* Add AllowlistSynchronizer custom resource for new GKE Autopilot WorkloadAllowlists. Requires GKE version 1.32.
1-gke.1729000 or later.
1-gke.1729000 or later.

## 3.97.0

* Update apm.instrumentation documentation from beta to preview.
* Update apm.instrumentation documentation from beta to preview.

## 3.96.0

Expand Down Expand Up @@ -1564,7 +1568,7 @@ Get rid of the old GODEBUG=x509ignoreCN=0 hack that is not effective anymore in
## 2.30.3

* Add `datadog.logs.autoMultiLineDetection` parameter to setup automatic multi-line log detection
See <https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#automatic-multi-line-aggregation>
See [https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#automatic-multi-line-aggregation](https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#automatic-multi-line-aggregation)
This new option requires an agent 7.32+.

## 2.30.2
Expand Down Expand Up @@ -2062,7 +2066,7 @@ Change OpenShift SCC priorities from 10 to 8 to avoid conflicts with OpenShift A
## 2.11.6

* Improve support for environment autodiscovery by removing explicit setting of `DOCKER_HOST` by default with Agent 7.27+.
Starting Agent 7.27, the recommended setup is to never set `datadog.dockerSocketPath` or `datadog.criSocketPath`, except if your setup is using non-standard paths.
Starting Agent 7.27, the recommended setup is to never set `datadog.dockerSocketPath` or `datadog.criSocketPath`, except if your setup is using non-standard paths.

## 2.11.5

Expand Down Expand Up @@ -2419,7 +2423,7 @@ Starting Agent 7.27, the recommended setup is to never set `datadog.dockerSocket
## 2.4.23

* Add `datadog.envFrom` parameter to support passing references to secrets and/or configmaps for environment
variables, instead of passing one by one.
variables, instead of passing one by one.

## 2.4.22

Expand All @@ -2440,11 +2444,11 @@ variables, instead of passing one by one.
* `agents.networkPolicy.create`
* `clusterAgent.networkPolicy.create`
* `clusterChecksRunner.networkPolicy.create`
The NetworkPolicy managed by the Helm chart are designed to work out-of-the-box on most setups.
In particular, the agents need to connect to the datadog intakes. NetworkPolicy can be restricted
by IP but the datadog intake IP cannot be guaranteed to be stable.
The agents are also susceptible to connect to any pod, on any port, depending on the "auto-discovery" annotations
that can be dynamically added to them.
The NetworkPolicy managed by the Helm chart are designed to work out-of-the-box on most setups.
In particular, the agents need to connect to the datadog intakes. NetworkPolicy can be restricted
by IP but the datadog intake IP cannot be guaranteed to be stable.
The agents are also susceptible to connect to any pod, on any port, depending on the "auto-discovery" annotations
that can be dynamically added to them.

## 2.4.18

Expand Down Expand Up @@ -2714,7 +2718,7 @@ variables, instead of passing one by one.
## 2.2.11

* Add documentations around secret management in the datadog helm chart. It is to upstream
requested changes in the IBM charts repository: <https://github.com/IBM/charts/pull/690#discussion_r411702458>
requested changes in the IBM charts repository: [https://github.com/IBM/charts/pull/690#discussion_r411702458](https://github.com/IBM/charts/pull/690#discussion_r411702458)
* update `kube-state-metrics` dependency
* uncomment every values.yaml parameters for IBM chart compliancy

Expand Down Expand Up @@ -2774,7 +2778,7 @@ variables, instead of passing one by one.
## 2.1.2

* Fixed a bug where `DD_LEADER_ELECTION` was not set in the config init container, leading to a failure to adapt
config to this environment variable.
config to this environment variable.

## 2.1.1

Expand All @@ -2793,13 +2797,13 @@ config to this environment variable.
* Fix `system-probe` startup on latest versions of containerd.
Here is the error that this change fixes:

``` State: Waiting
```State:
Reason: CrashLoopBackOff
Last State: Terminated
Reason: StartError
Message: failed to create containerd task: OCI runtime create failed: container_linux.go:349: starting container process caused "close exec fds: ensure /proc/self/fd is on procfs: operation not permitted": unknown
Exit Code: 128
```
```

## 2.0.11

Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: datadog
version: 3.98.0
version: 3.98.1
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.98.0](https://img.shields.io/badge/Version-3.98.0-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.98.1](https://img.shields.io/badge/Version-3.98.1-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)

[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).

Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/templates/cluster-agent-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ metadata:
namespace: {{ .Release.Namespace }}

{{- $groupedResources := dict }}
{{- $mergedResources := mergeOverwrite dict (default dict .Values.datadog.kubernetesResourcesAnnotationsAsTags) (default dict .Values.datadog.kubernetesResourcesLabelsAsTags)}}
{{- $mergedResources := mergeOverwrite (deepCopy (default dict .Values.datadog.kubernetesResourcesAnnotationsAsTags)) (deepCopy (default dict .Values.datadog.kubernetesResourcesLabelsAsTags))}}
{{- range $resource, $labels := $mergedResources }}
{{- $parts := splitList "." $resource }}
{{- $apiGroup := "" }}
Expand Down
Loading

0 comments on commit 643aedf

Please sign in to comment.