helm-charts
helm-charts copied to clipboard
fix: support object for httpUser and httpPassword in fluentbit ES output
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/httpPasswordinvalues.yaml:httpUser: valueFrom: secretKeyRef: name: elastic-fluent-operator-secret key: username httpPassword: valueFrom: secretKeyRef: name: elastic-fluent-operator-secret key: password - Run
helm templateand verify the rendered manifest contains the object, not a string.
Related issues
- CRD validation errors when using secret references for ES output
- Reference: fluent-operator docs
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!