Skip to content

Commit 185a3b8

Browse files
committed
Add extraContainers to fluentd chart
Copy the templating and the examples in the values file from the fluent-bit chart. Signed-off-by: Thomas Hartland <[email protected]>
1 parent 149d575 commit 185a3b8

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

charts/fluentd/templates/_pod.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ containers:
8787
- mountPath: /var/log/fluent
8888
name: {{ include "fluentd.fullname" . }}-buffer
8989
{{- end }}
90+
{{- if .Values.extraContainers }}
91+
{{- if kindIs "string" .Values.extraContainers }}
92+
{{- tpl .Values.extraContainers $ | nindent 2 }}
93+
{{- else }}
94+
{{- toYaml .Values.extraContainers | nindent 2 }}
95+
{{- end -}}
96+
{{- end }}
9097
volumes:
9198
- name: etcfluentd-main
9299
configMap:

charts/fluentd/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,21 @@ envFrom: []
174174

175175
initContainers: []
176176

177+
# This supports either a structured array or a templatable string
178+
extraContainers: []
179+
180+
# Array mode
181+
# extraContainers:
182+
# - name: do-something
183+
# image: busybox
184+
# command: ['do', 'something']
185+
186+
# String mode
187+
# extraContainers: |-
188+
# - name: do-something
189+
# image: bitnami/kubectl:{{ .Capabilities.KubeVersion.Major }}.{{ .Capabilities.KubeVersion.Minor }}
190+
# command: ['kubectl', 'version']
191+
177192
## Name of the configMap containing a custom fluentd.conf configuration file to use instead of the default.
178193
# mainConfigMapNameOverride: ""
179194

0 commit comments

Comments
 (0)