extraConfig rendered incorrectly
Closed this issue · 1 comments
holograph commented
When using v0.4.1 as follows:
helm -n monitoring upgrade \
--set daemonset.logType="$CLUSTER_NAME" \
--set secrets.logzioShippingToken=$LOGZIO_TOKEN \
--set secrets.logzioListener='listener-eu.logz.io' \
--set-file configmap.extraConfig=./fluentd-extra.yml \
logzio-fluentd logzio-helm/logzio-fluentd
And with the extras file as follows:
zerto.conf: |-
# Elide Zerto logs
<match kubernetes.var.log.containers.**zerto**.log>
@type null
</match>
drop.conf: |-
# Elide metric exporter logs
<match kubernetes.var.log.containers.**logzio-otel-k8s-metrics-otel-collector**.log>
@type null
</match>
# Drop empty log lines
<filter **>
@type grep
<exclude>
key message
pattern ^\s*$
</exclude>
</filter>
The resulting configmap is incorrect (and don't ask how long it took to figure out why my drops weren't taking effect...). Check out the includes derived from the extraConfig file:
fluent.conf: |
@include "#{ENV['FLUENTD_SYSTEMD_CONF'] || 'systemd'}.conf"
@include "#{ENV['FLUENTD_PROMETHEUS_CONF'] || 'prometheus'}.conf"
@include kubernetes.conf
@include system.conf
@include conf.d/*.conf
@include drop.conf@include zerto.conf
<match "#{ENV['INCLUDE_NAMESPACE'] || '**'}">
I haven't found a way to work around this except to modify the configmap manually post-install.
mirii1994 commented
Hi @holograph,
Thank you for reporting this bug, and sorry for the inconvenience.
We will work on a fix, but we don't have an ETA for it at the moment.
If you want, you can contribute a PR for this :)