Skip to content

Commit

Permalink
update chart to conditionally add config fields based on healthPort v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
tblake333 committed Sep 7, 2023
1 parent 0173669 commit 6fdbddf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/datadog/templates/_container-system-probe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
{{- include "containers-common-env" . | nindent 4 }}
- name: DD_LOG_LEVEL
value: {{ .Values.agents.containers.systemProbe.logLevel | default .Values.datadog.logLevel | quote }}
- name: DD_SYSTEM_PROBE_HEALTH_PORT
{{- $healthPort := .Values.agents.containers.systemProbe.healthPort }}
{{- if (gt $healthPort 0)}}
- name: DD_SYSTEM_PROBE_HEALTH_PORT
value: {{ $healthPort | quote }}
{{- end }}
{{- if .Values.datadog.serviceMonitoring.enabled }}
- name: HOST_ROOT
value: "/host/root"
Expand Down Expand Up @@ -154,10 +156,12 @@
{{- if .Values.agents.volumeMounts }}
{{ toYaml .Values.agents.volumeMounts | indent 4 }}
{{- end }}
{{- if (gt $healthPort 0)}}
livenessProbe:
{{- $live := .Values.agents.containers.systemProbe.livenessProbe }}
{{ include "probe.http" (dict "path" "/live" "port" $healthPort "settings" $live) | indent 4 }}
readinessProbe:
{{- $ready := .Values.agents.containers.systemProbe.readinessProbe }}
{{ include "probe.http" (dict "path" "/ready" "port" $healthPort "settings" $ready) | indent 4 }}
{{- end }}
{{- end -}}

0 comments on commit 6fdbddf

Please sign in to comment.