Skip to content

Commit

Permalink
Add extraContainers to fluentd chart
Browse files Browse the repository at this point in the history
Copy the templating and the examples in
the values file from the fluent-bit chart.

Signed-off-by: Thomas Hartland <[email protected]>
  • Loading branch information
tghartland committed Nov 8, 2024
1 parent 149d575 commit 185a3b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/fluentd/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ containers:
- mountPath: /var/log/fluent
name: {{ include "fluentd.fullname" . }}-buffer
{{- end }}
{{- if .Values.extraContainers }}
{{- if kindIs "string" .Values.extraContainers }}
{{- tpl .Values.extraContainers $ | nindent 2 }}
{{- else }}
{{- toYaml .Values.extraContainers | nindent 2 }}
{{- end -}}
{{- end }}
volumes:
- name: etcfluentd-main
configMap:
Expand Down
15 changes: 15 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,21 @@ envFrom: []

initContainers: []

# This supports either a structured array or a templatable string
extraContainers: []

# Array mode
# extraContainers:
# - name: do-something
# image: busybox
# command: ['do', 'something']

# String mode
# extraContainers: |-
# - name: do-something
# image: bitnami/kubectl:{{ .Capabilities.KubeVersion.Major }}.{{ .Capabilities.KubeVersion.Minor }}
# command: ['kubectl', 'version']

## Name of the configMap containing a custom fluentd.conf configuration file to use instead of the default.
# mainConfigMapNameOverride: ""

Expand Down

0 comments on commit 185a3b8

Please sign in to comment.