UNCLASSIFIED - NO CUI

Skip to content

configmap rendering issue when additionalOutputs enabled (loki, fluentd)

Fluent-Bit Template Issue

Enabling loki or fluentd in the additionalOutput causes a template rendering issue. This occurs with or without the user and password values being populated.


Believe the issue to be related to the . context in the chart/templates/configmap.yaml.

Reproduction Steps

FluentD

cp chart/values.yaml test-fluentd.yaml

patch -p0 << 'EOF'
diff -u chart/values.yaml test-fluentd.yaml
--- test-fluentd.yaml	2025-02-13 09:28:12
+++ chart/values.yaml	2025-02-13 09:25:39
@@ -72,13 +72,13 @@
     #   Buffer_Size: 8KB
   # -- Options to enable a fluentd output
   fluentd:
-    host: ""
+    host: "fluentd.example.mil"
     port: 24224
     match:
       - "kube.*"
       - "host.*"
-    user: ""
-    password: ""
+    user: "testing"
+    password: "testing"
     # -- Overriden by username and password
     sharedKey: ""
     # -- Toggle on TLS
EOF

helm template -f test-values.yaml chart
Error: template: fluentbit/templates/daemonset.yaml:37:28: executing "fluentbit/templates/daemonset.yaml" at <include (print $.Template.BasePath "/configmap.yaml") .>: error calling include: template: fluentbit/templates/configmap.yaml:65:19: executing "fluentbit/templates/configmap.yaml" at <.user>: can't evaluate field user in type interface {}

Expected Outcome: Enabling the fluentd output should still allow the template to fully render and create usable resources.

Loki

cp chart/values.yaml test-loki.yaml

patch -p0 << 'EOF'
--- chart/values.yaml	2025-02-13 09:25:39
+++ test-loki.yaml	2025-02-13 10:09:52
@@ -101,7 +101,7 @@
     #   Self_Hostname: "custom_value"
   # -- Options to enable a loki output
   loki:
-    host: ""
+    host: "loki.example.mil"
     port: 3100
     match:
       - "kube.*"
EOF

helm template -f test-loki.yaml chart
Error: template: fluentbit/templates/daemonset.yaml:37:28: executing "fluentbit/templates/daemonset.yaml" at <include (print $.Template.BasePath "/configmap.yaml") .>: error calling include: template: fluentbit/templates/configmap.yaml:104:19: executing "fluentbit/templates/configmap.yaml" at <.user>: can't evaluate field user in type interface {}

Expected Outcome: Enabling the loki output should still allow the template to fully render and create usable resources.