add ability to use a configmap to provide the (#20744)

datadog-cluster.yaml config file

Signed-off-by: Matthew Gifford <matthew.gifford@railinc.com>
This commit is contained in:
MattTheCat
2020-02-16 13:29:27 -08:00
committed by GitHub
parent 8feeaa24a9
commit 275d0344f3
4 changed files with 36 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 1.39.8
version: 1.39.9
appVersion: "7"
description: DataDog Agent
keywords:
@@ -0,0 +1,18 @@
{{- if .Values.clusterAgent.datadog_cluster_yaml }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "datadog.fullname" . }}-cluster-agent-config
labels:
app: "{{ template "datadog.fullname" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app.kubernetes.io/name: "{{ template "datadog.fullname" . }}"
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
data:
{{tpl (toYaml .Values.clusterAgent.datadog_cluster_yaml) . | indent 2}}
{{- end }}
@@ -175,12 +175,24 @@ spec:
{{- if .Values.clusterAgent.volumeMounts }}
{{ toYaml .Values.clusterAgent.volumeMounts | indent 10 }}
{{- end }}
{{- if .Values.clusterAgent.datadog_cluster_yaml }}
- name: cluster-agent-yaml
mountPath: /etc/datadog-agent/datadog-cluster.yaml
subPath: datadog-cluster.yaml
readOnly: true
{{- end}}
volumes:
{{- if .Values.clusterAgent.confd }}
- name: confd
configMap:
name: {{ template "datadog.fullname" . }}-cluster-agent-confd
{{- end }}
{{- if .Values.clusterAgent.datadog_cluster_yaml }}
- name: cluster-agent-yaml
configMap:
name: {{ template "datadog.fullname" . }}-cluster-agent-config
{{- end}}
{{- if .Values.clusterAgent.volumes }}
{{ toYaml .Values.clusterAgent.volumes | indent 10 }}
{{- end }}
+5 -1
View File
@@ -486,6 +486,10 @@ clusterAgent:
# - name: <VOLUME_NAME>
# mountPath: <CONTAINER_PATH>
# readOnly: true
## @param datadog-cluster.yaml - object - optional
## Specify custom contents for the datadog cluster agent config (datadog-cluster.yaml).
#
# datadog_cluster_yaml: {}
rbac:
@@ -760,7 +764,7 @@ daemonset:
deployment:
## @param enabled - boolean - required
## Apart from DaemonSet, deploy Datadog agent pods and related service for
## applications that want to send custom metrics. Provides DogStasD service.
## applications that want to send custom metrics. Provides DogStatsD service.
#
enabled: false