Skip to content

Commit

Permalink
[CONTP-277] Expose k8s resource labels as tags to configure tagger
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedos committed Sep 23, 2024
1 parent 451b673 commit abbab2c
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
5 changes: 5 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Datadog changelog

## 3.71.2

* Add `datadog.kubernetesResourcesLabelsAsTags` to assign Kubernetes Resources Labels as tags in the tagger
* Add `datadog.kubernetesResourcesAnnotationsAsTags` to assign Kuberenetes Annotations as tags in the tagger

## 3.71.1

* Update `fips.image.tag` to `1.1.5` updating openSSL version to 3.0.15
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 3.71.1
version: 3.71.2
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
4 changes: 3 additions & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.71.1](https://img.shields.io/badge/Version-3.71.1-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.71.2](https://img.shields.io/badge/Version-3.71.2-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 Expand Up @@ -748,6 +748,8 @@ helm install <RELEASE_NAME> \
| datadog.kubelet.hostCAPath | string | None (no mount from host) | Path (on host) where the Kubelet CA certificate is stored |
| datadog.kubelet.podLogsPath | string | /var/log/pods on Linux, C:\var\log\pods on Windows | Path (on host) where the PODs logs are located |
| datadog.kubelet.tlsVerify | string | true | Toggle kubelet TLS verification |
| datadog.kubernetesResourcesAnnotationsAsTags | object | `{}` | Provide mapping of Kubernetes Resource Annotations to Datadog Tags |
| datadog.kubernetesResourcesLabelsAsTags | object | `{}` | Provide mapping of Kubernetes Resource Labels to Datadog Tags |
| datadog.kubernetesEvents.collectedEventTypes | list | `[{"kind":"Pod","reasons":["Failed","BackOff","Unhealthy","FailedScheduling","FailedMount","FailedAttachVolume"]},{"kind":"Node","reasons":["TerminatingEvictedPod","NodeNotReady","Rebooted","HostPortConflict"]},{"kind":"CronJob","reasons":["SawCompletedJob"]}]` | Event types to be collected. This requires datadog.kubernetesEvents.unbundleEvents to be set to true. |
| datadog.kubernetesEvents.unbundleEvents | bool | `false` | Allow unbundling kubernetes events, 1:1 mapping between Kubernetes and Datadog events. (Requires Cluster Agent 7.42.0+). |
| datadog.leaderElection | bool | `true` | Enables leader election mechanism for event collection |
Expand Down
8 changes: 8 additions & 0 deletions charts/datadog/templates/_components-common-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
- name: DD_KUBERNETES_NAMESPACE_ANNOTATIONS_AS_TAGS
value: '{{ toJson .Values.datadog.namespaceAnnotationsAsTags }}'
{{- end }}
{{- if .Values.datadog.kubernetesResourcesLabelsAsTags }}
- name: DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS
value: '{{ toJson .Values.datadog.kubernetesResourcesLabelsAsTags }}'
{{- end}}
{{- if .Values.datadog.kubernetesResourcesAnnotationsAsTags }}
- name: DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS
value: '{{ toJson .Values.datadog.kubernetesResourcesAnnotationsAsTags }}'
{{- end}}
- name: KUBERNETES
value: "yes"
{{- if .Values.datadog.site }}
Expand Down
10 changes: 10 additions & 0 deletions charts/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,16 @@ datadog:
# env: environment
# <KUBERNETES_NAMESPACE_ANNOTATIONS>: <DATADOG_TAG_KEY>

# datadog.kubernetesResourcesLabelsAsTags -- Provide a mapping of Kubernetes Resources Labels to Datadog Tags
kubernetesResourcesLabelsAsTags: {}
# env: environment
# <KUBERNETES_RESOURCE_LABEL>: <DATADOG_TAG_KEY>

# datadog.kubernetesResourcesAnnotationsAsTags -- Provide a mapping of Kubernetes Resources Annotations to Datadog Tags
kubernetesResourcesAnnotationsAsTags: {}
# env: environment
# <KUBERNETES_RESOURCE_ANNOTATIONS>: <DATADOG_TAG_KEY>

originDetectionUnified:
# datadog.originDetectionUnified.enabled -- Enabled enables unified mechanism for origin detection. Default: false. (Requires Agent 7.54.0+).
enabled: false
Expand Down

0 comments on commit abbab2c

Please sign in to comment.