Skip to content

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

Open
rezNetDevOps wants to merge 1 commit intofluent:mainfrom
rezNetDevOps:fix-fluentbit-es-httpuser-object
Open

fix: support object for httpUser and httpPassword in fluentbit ES output#620
rezNetDevOps wants to merge 1 commit intofluent:mainfrom
rezNetDevOps:fix-fluentbit-es-httpuser-object

Conversation

@rezNetDevOps
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant