diff --git a/charts/datadog/CHANGELOG.md b/charts/datadog/CHANGELOG.md index 31c524c92..f354ac8e3 100644 --- a/charts/datadog/CHANGELOG.md +++ b/charts/datadog/CHANGELOG.md @@ -1,5 +1,9 @@ # Datadog changelog +## 3.90.4 + +* Fix RBAC rendering and map merge when `datadog.kubernetesResourcesAnnotationsAsTags` and/or `datadog.kubernetesResourcesLabelsAsTags` are used. + ## 3.90.3 * Defaults `registry` to `gcr.io/datadoghq` when setting `datadog.site: us3.datadoghq.com` and deploying on GKE Autopilot (`providers.gke.autopilot: true`). @@ -46,7 +50,7 @@ ## 3.87.0 -* Launch `otel-agent` with the `--core-config` switch pointing to the main agent configuration. Note that this affects the OTel Agent beta images, early beta image releases with version tag `<7.59.0-v.1.2.0` will experience issues and should remain on older helm chart versions for their deployments. For regular users not deploying the `otel-agent` beta images, this should be a NOOP. +* Launch `otel-agent` with the `--core-config` switch pointing to the main agent configuration. Note that this affects the OTel Agent beta images, early beta image releases with version tag `<7.59.0-v.1.2.0` will experience issues and should remain on older helm chart versions for their deployments. For regular users not deploying the `otel-agent` beta images, this should be a NOOP. ## 3.86.0 diff --git a/charts/datadog/Chart.yaml b/charts/datadog/Chart.yaml index 62a573977..a5420f8d6 100644 --- a/charts/datadog/Chart.yaml +++ b/charts/datadog/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v1 name: datadog -version: 3.90.3 +version: 3.90.4 appVersion: "7" description: Datadog Agent keywords: diff --git a/charts/datadog/README.md b/charts/datadog/README.md index d7b0271a2..491597d00 100644 --- a/charts/datadog/README.md +++ b/charts/datadog/README.md @@ -1,6 +1,6 @@ # Datadog -![Version: 3.90.3](https://img.shields.io/badge/Version-3.90.3-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square) +![Version: 3.90.4](https://img.shields.io/badge/Version-3.90.4-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/). diff --git a/charts/datadog/templates/cluster-agent-rbac.yaml b/charts/datadog/templates/cluster-agent-rbac.yaml index 8bf355ebb..9f0cdd917 100644 --- a/charts/datadog/templates/cluster-agent-rbac.yaml +++ b/charts/datadog/templates/cluster-agent-rbac.yaml @@ -515,14 +515,13 @@ metadata: namespace: {{ .Release.Namespace }} {{- $groupedResources := dict }} -{{- $mergedResources := merge (default dict .Values.datadog.kubernetesResourcesAnnotationsAsTags) (default dict .Values.datadog.kubernetesResourcesLabelsAsTags)}} +{{- $mergedResources := mergeOverwrite dict (default dict .Values.datadog.kubernetesResourcesAnnotationsAsTags) (default dict .Values.datadog.kubernetesResourcesLabelsAsTags)}} {{- range $resource, $labels := $mergedResources }} - {{- $parts := split "." $resource }} + {{- $parts := splitList "." $resource }} {{- $apiGroup := "" }} - {{- $resourceName := $resource }} - {{- if eq (len $parts) 2 }} - {{- $apiGroup = index $parts "_1" }} - {{- $resourceName = index $parts "_0" }} + {{- $resourceName := mustFirst $parts }} + {{- if gt (len $parts) 1 }} + {{- $apiGroup = join "." (mustRest $parts) }} {{- end }} {{- $existing := index $groupedResources $apiGroup | default (list) }} {{- $groupedResources = set $groupedResources $apiGroup (append $existing $resourceName) }} @@ -559,4 +558,4 @@ subjects: - kind: ServiceAccount name: {{ template "datadog.fullname" . }}-cluster-agent namespace: {{ .Release.Namespace }} -{{- end -}} \ No newline at end of file +{{- end -}}