diff --git a/charts/fluent-bit/Chart.yaml b/charts/fluent-bit/Chart.yaml index 8501fa53..4045b8d5 100644 --- a/charts/fluent-bit/Chart.yaml +++ b/charts/fluent-bit/Chart.yaml @@ -5,7 +5,7 @@ keywords: - logging - fluent-bit - fluentd -version: 0.46.3 +version: 0.46.4 appVersion: 3.0.3 icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg home: https://fluentbit.io/ @@ -22,5 +22,5 @@ maintainers: email: steve.hipwell@gmail.com annotations: artifacthub.io/changes: | - - kind: changed - description: "Updated _Fluent Bit_ OCI image to [v3.0.3](https://github.com/fluent/fluent-bit/releases/tag/v3.0.3)." + - kind: added + description: "Support setting extraContainers to a string value to enable full templating." diff --git a/charts/fluent-bit/templates/_pod.tpl b/charts/fluent-bit/templates/_pod.tpl index 7f74f4a5..18258a75 100644 --- a/charts/fluent-bit/templates/_pod.tpl +++ b/charts/fluent-bit/templates/_pod.tpl @@ -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 diff --git a/charts/fluent-bit/values.yaml b/charts/fluent-bit/values.yaml index 1a60fe7b..2e392b4f 100644 --- a/charts/fluent-bit/values.yaml +++ b/charts/fluent-bit/values.yaml @@ -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