helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

fix: support object for httpUser and httpPassword in fluentbit ES output

Open rezNetDevOps opened this issue 6 months ago • 0 comments

What does this PR do?

This PR updates the fluent-operator Helm chart to support both string and object values for the httpUser and httpPassword fields in the Elasticsearch output. This is required for compatibility with recent CRDs that expect these fields to be objects when using secret references.

Why is it needed?

Currently, the template always renders these fields as strings, which causes CRD validation errors when an object is required (e.g., for secret references). This change adds logic to render the value as an object if a map is provided, or as a string otherwise, for backward compatibility.

How to test

  • Provide an object for httpUser/httpPassword in values.yaml:
    httpUser:
      valueFrom:
        secretKeyRef:
          name: elastic-fluent-operator-secret
          key: username
    httpPassword:
      valueFrom:
        secretKeyRef:
          name: elastic-fluent-operator-secret
          key: password
    
  • Run helm template and verify the rendered manifest contains the object, not a string.

Related issues

Signed-off-by

This PR is signed off in accordance with the DCO.


Let me know if you need any more info or want me to add tests!

rezNetDevOps avatar Jun 26 '25 13:06 rezNetDevOps