Skip to content

Commit

Permalink
embed components common env vars in clc runner
Browse files Browse the repository at this point in the history
  • Loading branch information
adel121 committed Oct 7, 2024
1 parent 0802799 commit 6b9e19f
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
4 changes: 4 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 3.73.2

* Pass components env variables to the cluster checks runner deployment pod spec.

## 3.73.1

* Add role-based access control rules to Datadog Cluster Agent to read k8s resources annotations and labels to create tags.
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.73.1
version: 3.73.2
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.73.1](https://img.shields.io/badge/Version-3.73.1-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.73.2](https://img.shields.io/badge/Version-3.73.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
6 changes: 1 addition & 5 deletions charts/datadog/templates/_components-common-env.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# The purpose of this template is to define a minimal set of environment
# variables shared between components: agent, cluster-agent
# variables shared between components: agent, cluster-agent and cluster checks runner
{{- define "components-common-env" -}}
- name: DD_LANGUAGE_DETECTION_ENABLED
value: {{ include "language-detection-enabled" . | quote }}
- name: DD_LANGUAGE_DETECTION_REPORTING_ENABLED
value: {{ include "language-detection-enabled" . | quote }}
{{- if .Values.datadog.secretBackend.command }}
- name: DD_SECRET_BACKEND_COMMAND
value: {{ .Values.datadog.secretBackend.command | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/datadog/templates/_containers-common-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
value: {{ template "datadog.confPath" . }}/auth/token
{{- end }}
{{ include "components-common-env" . }}
{{ include "language-detection-common-env" . }}
{{- if .Values.datadog.kubelet.host }}
- name: DD_KUBERNETES_KUBELET_HOST
{{ toYaml .Values.datadog.kubelet.host | indent 2 }}
Expand Down
8 changes: 8 additions & 0 deletions charts/datadog/templates/_language_detection_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The purpose of this template is to define a minimal set of environment
# variables to enable language detection
{{- define "language-detection-common-env" -}}
- name: DD_LANGUAGE_DETECTION_ENABLED
value: {{ include "language-detection-enabled" . | quote }}
- name: DD_LANGUAGE_DETECTION_REPORTING_ENABLED
value: {{ include "language-detection-enabled" . | quote }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ spec:
{{- end }}
{{- end }}
env:
{{- include "components-common-env" . | nindent 10 }}
- name: DD_API_KEY
valueFrom:
secretKeyRef:
Expand Down
1 change: 1 addition & 0 deletions charts/datadog/templates/cluster-agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ spec:
key: api-key
optional: true
{{- include "components-common-env" . | nindent 10 }}
{{- include "language-detection-common-env" . | nindent 10 }}
{{- if .Values.clusterAgent.metricsProvider.enabled }}
- name: DD_APP_KEY
valueFrom:
Expand Down

0 comments on commit 6b9e19f

Please sign in to comment.