Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 3c31d9a

Browse files
committed
add backwards compatibility for extraContainers
1 parent 8fd06d9 commit 3c31d9a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

filebeat/templates/daemonset.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ spec:
196196
{{ toYaml (.Values.extraVolumeMounts | default .Values.daemonset.extraVolumeMounts ) | indent 8 }}
197197
{{- end }}
198198
{{- if .Values.extraContainers }}
199+
# Currently some extra blocks accept strings
200+
# to continue with backwards compatibility this is being kept
201+
# whilst also allowing for yaml to be specified too.
202+
{{- if eq "string" (printf "%T" .Values.extraContainers) }}
199203
{{ tpl .Values.extraContainers . | indent 6 }}
204+
{{- else }}
205+
{{ toYaml .Values.extraContainers | indent 6 }}
206+
{{- end }}
200207
{{- end }}
201208
{{- end }}

filebeat/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ spec:
152152
{{ toYaml ( .Values.extraVolumeMounts | default .Values.deployment.extraVolumeMounts ) | indent 8 }}
153153
{{- end }}
154154
{{- if .Values.extraContainers }}
155+
# Currently some extra blocks accept strings
156+
# to continue with backwards compatibility this is being kept
157+
# whilst also allowing for yaml to be specified too.
158+
{{- if eq "string" (printf "%T" .Values.extraContainers) }}
155159
{{ tpl .Values.extraContainers . | indent 6 }}
160+
{{- else }}
161+
{{ toYaml .Values.extraContainers | indent 6 }}
162+
{{- end }}
156163
{{- end }}
157164
{{- end }}

0 commit comments

Comments
 (0)