mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/datadog] Ensure the trace-agent computes the same hostname as the core agent (#22110)
by giving it access to all the elements that might be used to compute the hostname: the `DD_CLUSTER_NAME` environment variable and the docker socket. Signed-off-by: Lénaïc Huard <lenaic.huard@datadoghq.com>
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
# Datadog changelog
|
||||
|
||||
## 2.2.6
|
||||
|
||||
* Ensure the `trace-agent` computes the same hostname as the core `agent`.
|
||||
by giving it access to all the elements that might be used to compute the hostname:
|
||||
the `DD_CLUSTER_NAME` environment variable and the docker socket.
|
||||
|
||||
## 2.2.5
|
||||
|
||||
* Fix RBAC
|
||||
|
||||
## 2.2.4
|
||||
|
||||
* Move several EnvVars to `common-env-vars` to be accessible by the `trace-agent` #21991.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: datadog
|
||||
version: 2.2.5
|
||||
version: 2.2.6
|
||||
appVersion: "7"
|
||||
description: Datadog Agent
|
||||
keywords:
|
||||
|
||||
@@ -14,13 +14,6 @@
|
||||
protocol: UDP
|
||||
env:
|
||||
{{- include "containers-common-env" . | nindent 4 }}
|
||||
{{- if .Values.datadog.clusterName }}
|
||||
{{- if not (regexMatch "^([a-z]([a-z0-9\\-]{0,38}[a-z0-9])?\\.)*([a-z]([a-z0-9\\-]{0,38}[a-z0-9])?)$" .Values.datadog.clusterName) }}
|
||||
{{- fail "Your `clusterName` isn’t valid. It must be dot-separated tokens where a token start with a lowercase letter followed by up to 39 lowercase letters, numbers, or hyphens and cannot end with a hyphen."}}
|
||||
{{- end}}
|
||||
- name: DD_CLUSTER_NAME
|
||||
value: {{ .Values.datadog.clusterName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.logLevel }}
|
||||
- name: DD_LOG_LEVEL
|
||||
value: {{ .Values.agents.containers.agent.logLevel | default .Values.datadog.logLevel | quote }}
|
||||
@@ -77,19 +70,6 @@
|
||||
value: {{ (default false (or .Values.datadog.logs.containerCollectAll .Values.datadog.logsConfigContainerCollectAll)) | quote}}
|
||||
- name: DD_LOGS_CONFIG_K8S_CONTAINER_USE_FILE
|
||||
value: {{ .Values.datadog.logs.containerCollectUsingFiles | quote }}
|
||||
{{- if .Values.datadog.dockerSocketPath }}
|
||||
- name: DOCKER_HOST
|
||||
{{- if eq .Values.targetSystem "linux" }}
|
||||
value: unix://{{ .Values.datadog.dockerSocketPath }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.targetSystem "windows" }}
|
||||
value: npipe://{{ .Values.datadog.dockerSocketPath | replace "\\" "/" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.criSocketPath }}
|
||||
- name: DD_CRI_SOCKET_PATH
|
||||
value: {{ .Values.datadog.criSocketPath }}
|
||||
{{- end }}
|
||||
{{- if not .Values.datadog.livenessProbe }}
|
||||
- name: DD_HEALTH_PORT
|
||||
value: "5555"
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
mountPath: {{ template "datadog.confPath" . }}/datadog.yaml
|
||||
subPath: datadog.yaml
|
||||
{{- end }}
|
||||
- name: runtimesocket
|
||||
mountPath: {{ template "datadog.dockerOrCriSocketPath" . }}
|
||||
{{- if eq .Values.targetSystem "linux" }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
{{ toYaml .Values.agents.containers.traceAgent.livenessProbe | indent 4 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
- name: DD_HOSTNAME
|
||||
value: {{ .Values.datadog.hostname | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.clusterName }}
|
||||
{{- if not (regexMatch "^([a-z]([a-z0-9\\-]{0,38}[a-z0-9])?\\.)*([a-z]([a-z0-9\\-]{0,38}[a-z0-9])?)$" .Values.datadog.clusterName) }}
|
||||
{{- fail "Your `clusterName` isn’t valid. It must be dot-separated tokens where a token start with a lowercase letter followed by up to 39 lowercase letters, numbers, or hyphens and cannot end with a hyphen."}}
|
||||
{{- end}}
|
||||
- name: DD_CLUSTER_NAME
|
||||
value: {{ .Values.datadog.clusterName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.tags }}
|
||||
- name: DD_TAGS
|
||||
value: {{ .Values.datadog.tags | join " " | quote }}
|
||||
@@ -46,4 +53,17 @@
|
||||
- name: {{ $value.name }}
|
||||
value: {{ $value.value | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.dockerSocketPath }}
|
||||
- name: DOCKER_HOST
|
||||
{{- if eq .Values.targetSystem "linux" }}
|
||||
value: unix://{{ .Values.datadog.dockerSocketPath }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.targetSystem "windows" }}
|
||||
value: npipe://{{ .Values.datadog.dockerSocketPath | replace "\\" "/" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.criSocketPath }}
|
||||
- name: DD_CRI_SOCKET_PATH
|
||||
value: {{ .Values.datadog.criSocketPath }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -43,14 +43,6 @@
|
||||
value: {{ .Values.datadog.leaderElection | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.dockerSocketPath }}
|
||||
- name: DOCKER_HOST
|
||||
value: unix://{{ .Values.datadog.dockerSocketPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.criSocketPath }}
|
||||
- name: DD_CRI_SOCKET_PATH
|
||||
value: {{ .Values.datadog.criSocketPath }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.agents.containers.initContainers.resources | indent 4 }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -33,14 +33,6 @@
|
||||
mountPath: {{ template "datadog.dockerOrCriSocketPath" . }}
|
||||
env:
|
||||
{{- include "containers-common-env" . | nindent 4 }}
|
||||
{{- if .Values.datadog.dockerSocketPath }}
|
||||
- name: DOCKER_HOST
|
||||
value: npipe://{{ .Values.datadog.dockerSocketPath | replace "\\" "/" }}
|
||||
{{- end }}
|
||||
{{- if .Values.datadog.criSocketPath }}
|
||||
- name: DD_CRI_SOCKET_PATH
|
||||
value: {{ .Values.datadog.criSocketPath }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{ toYaml .Values.agents.containers.initContainers.resources | indent 4 }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user