Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
fix daemonset generation if datadog.securityContext==nil
Browse files Browse the repository at this point in the history
If the `datadog.securityContext` value is set to `nil` instead of `{}`
when a user want to remove the default `securityContext`, helm is not
able to generate the Daemonset manifest.

To support this configuration we have change how we test the value.
With the new `{{ if ...}}` check we don't check the second comparison
if the first already return false.

Signed-off-by: cedric lamoriniere <cedric.lamoriniere@datadoghq.com>
  • Loading branch information
clamoriniere committed Jul 10, 2020
1 parent 0a23538 commit 6a23542
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions stable/datadog/CHANGELOG.md
@@ -1,5 +1,9 @@
# Datadog changelog

## 2.3.28

* fix daemonset template generation if `datadog.securityContext` is set to `nil`

## 2.3.27

* add systemProbe.collectDNSStats option
Expand Down
2 changes: 1 addition & 1 deletion stable/datadog/Chart.yaml
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.3.27
version: 2.3.28
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion stable/datadog/templates/daemonset.yaml
Expand Up @@ -41,7 +41,7 @@ spec:
{{ toYaml .Values.agents.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if and .Values.datadog.securityContext .Values.datadog.securityContext.seLinuxOptions }}
{{- if (.Values.datadog.securityContext) and .Values.datadog.securityContext.seLinuxOptions }}
securityContext:
seLinuxOptions:
{{ toYaml .Values.datadog.securityContext.seLinuxOptions | indent 10 }}
Expand Down

0 comments on commit 6a23542

Please sign in to comment.