Fluentd: Render Config as Template

This change updates the fluentd configmap-etc to render
.Values.conf.fluentd.template as a template, allowing for greater
flexibility in configuration.

Change-Id: I8809767c679c377e319ecc53960c55ae18e1b558
This commit is contained in:
Steven Fitzpatrick 2020-05-11 10:13:44 -05:00
parent f8c5d06769
commit 2039805314
3 changed files with 5 additions and 3 deletions

View File

@ -23,5 +23,5 @@ metadata:
name: {{ printf "%s-%s" $envAll.Release.Name "fluentd-etc" | quote }}
type: Opaque
data:
fluent.conf: {{ .Values.conf.fluentd.template | b64enc }}
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.fluentd.template "key" "fluent.conf" "format" "Secret") | indent 2 }}
{{- end }}

View File

@ -59,10 +59,11 @@ dependencies:
conf:
fluentd:
# This field is now rendered as a helm template!
template: |
<source>
@type prometheus
port 24231
port {{ tuple "fluentd" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
</source>
<source>

View File

@ -40,10 +40,11 @@ deployment:
type: DaemonSet
conf:
fluentd:
# This field is now rendered as a helm template!
template: |
<source>
@type prometheus
port 24231
port {{ tuple "fluentd" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
</source>
<source>