Skip to content

make tls config in elastic more clearer #1645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smallc2009
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1452

Does this PR introduced a user-facing change?

- **Consolidate TLS configuration**: Move TLS enable flag into the `tls` object itself
- **Add nil pointer protection**: Prevent template errors when `tls` section is not defined
- **Improve template robustness**: Use `omit` function to exclude control fields from final config

Additional documentation, usage docs, etc.:

Before

fluentbit:
  output:
    es:
      enableTLS: true  # Separate enable flag
      tls:
        verify: On
        debug: 1

After

fluentbit:
  output:
    es:
      tls:
        enable: true  # Integrated enable flag
        verify: On
        debug: 1

Reflect to fluent-bit.config

[Output]
    Name    es
    Match_Regex    (?:kube|service)\.(.*)
    Host    <Elasticsearch url like elasticsearch-logging-data.kubesphere-logging-system.svc>
    Port    9200
    Buffer_Size    20MB
    Logstash_Format    true
    Logstash_Prefix    ks-logstash-log
    Time_Key    @timestamp
    Generate_ID    true
    Write_Operation    create
    Replace_Dots    false
    Trace_Error    true
    Suppress_Type_Name    Off
    tls    On
    tls.verify    true
    tls.debug    1

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.

bug: ElasticSearch output TLS config not reflect to fluent-bit.config
1 participant