Skip to content

Commit

Permalink
support tpl in extraContainers
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTan95 committed Apr 28, 2024
1 parent 4298193 commit 6ebc719
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.46.2
version: 0.46.3
appVersion: 3.0.2
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand Down
6 changes: 5 additions & 1 deletion charts/fluent-bit/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ containers:
{{- end }}
{{- end }}
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 2 }}
{{- if kindIs "string" .Values.extraContainers }}
{{- tpl .Values.extraContainers $ | nindent 2 }}
{{- else }}
{{- toYaml .Values.extraContainers | nindent 2 }}
{{- end -}}
{{- end }}
volumes:
- name: config
Expand Down
10 changes: 10 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,21 @@ envWithTpl: []

envFrom: []

# 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']

flush: 1

metricsPort: 2020
Expand Down

0 comments on commit 6ebc719

Please sign in to comment.