forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ClusterChecks deployment template (helm#12582)
* Add ClusterChecks deployment template Add the possibility to run dedicated agent(s) for handling the Cluster Checks process. It allows having dedicated `resources` request/limit for the Cluster Checks. Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com> * Some small update Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
- Loading branch information
1 parent
16cd2b0
commit 4c7c030
Showing
6 changed files
with
171 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: datadog | ||
version: 1.24.0 | ||
version: 1.25.0 | ||
appVersion: 6.10.1 | ||
description: DataDog Agent | ||
keywords: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{{- if and .Values.clusterAgent.clusterChecks.enabled .Values.clusterchecksDeployment.enabled }} | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "datadog.fullname" . }}-clusterchecks | ||
labels: | ||
app: "{{ template "datadog.fullname" . }}" | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
release: {{ .Release.Name | quote }} | ||
heritage: {{ .Release.Service | quote }} | ||
spec: | ||
replicas: {{ .Values.clusterchecksDeployment.replicas }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "datadog.fullname" . }}-clusterchecks | ||
name: {{ template "datadog.fullname" . }}-clusterchecks | ||
spec: | ||
serviceAccountName: {{ if .Values.rbac.create }}{{ template "datadog.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} | ||
containers: | ||
- name: {{ default .Chart.Name .Values.datadog.name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: DD_API_KEY | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "datadog.apiSecretName" . }} | ||
key: api-key | ||
- name: DD_EXTRA_CONFIG_PROVIDERS | ||
value: "clusterchecks" | ||
- {name: DD_HEALTH_PORT, value: "5555"} | ||
# Cluster checks | ||
- name: DD_CLUSTER_AGENT_KUBERNETES_SERVICE_NAME | ||
value: {{ template "datadog.fullname" . }}-cluster-agent | ||
- name: DD_CLUSTER_AGENT_AUTH_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ template "datadog.fullname" . }}-cluster-agent | ||
key: token | ||
- name: DD_CLUSTER_AGENT_ENABLED | ||
value: {{ .Values.clusterAgent.enabled | quote }} | ||
- {name: DD_EXTRA_CONFIG_PROVIDERS, value: "clusterchecks"} | ||
# Remove unused features | ||
- {name: DD_APM_ENABLED, value: "false"} | ||
- {name: DD_PROCESS_AGENT_ENABLED, value: "false"} | ||
- {name: DD_LOGS_ENABLED, value: "false"} | ||
# Safely run alongside the daemonset | ||
- {name: DD_ENABLE_METADATA_COLLECTION, value: "false"} | ||
- name: DD_HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
{{- if .Values.clusterchecksDeployment.env }} | ||
{{ toYaml .Values.clusterchecksDeployment.env | indent 10 }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.clusterchecksDeployment.resources | indent 12 }} | ||
volumeMounts: | ||
- {name: s6-run, mountPath: /var/run/s6} | ||
- {name: remove-corechecks, mountPath: /etc/datadog-agent/conf.d} | ||
{{- if .Values.clusterchecksDeployment.livenessProbe }} | ||
livenessProbe: | ||
{{ toYaml .Values.clusterchecksDeployment.livenessProbe | indent 10 }} | ||
{{- else }} | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 5555 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 15 | ||
timeoutSeconds: 5 | ||
successThreshold: 1 | ||
failureThreshold: 6 | ||
{{- end }} | ||
volumes: | ||
- {name: s6-run, emptyDir: {}} | ||
- {name: remove-corechecks, emptyDir: {}} | ||
affinity: | ||
{{- if .Values.clusterchecksDeployment.affinity }} | ||
{{ toYaml .Values.clusterchecksDeployment.affinity | indent 8 }} | ||
{{- else }} | ||
# Ensure we only run one worker per node, to avoid name collisions | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchLabels: | ||
app: {{ template "datadog.fullname" . }}-clusterchecks | ||
topologyKey: kubernetes.io/hostname | ||
{{- end }} | ||
{{- if .Values.clusterchecksDeployment.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.clusterchecksDeployment.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters