Skip to content

bug: fluent-bit flushSeconds should support fractional values #1405

@jjsiv

Description

@jjsiv

Describe the issue

It is currently not possible to use fractional values for flushSeconds, e.g 0.1s. My suggestion is to change it to float. This shouldn't break backwards compatibility

To Reproduce

apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterFluentBitConfig
metadata:
  name: fluent-bit-config
spec:
  inputSelector:
    matchLabels:
      fluentbit.fluent.io/enabled: "true"
  outputSelector:
    matchLabels:
      fluentbit.fluent.io/enabled: "true"
  service:
    flushSeconds: 0.1

Expected behavior

ClusterFluentBitConfig supports fractional values for flushSeconds

Your Environment

- Fluent Operator version:
- Container Runtime:
- Operating system:
- Kernel version:

How did you install fluent operator?

No response

Additional context

Even though official fluent-bit docs describe the value for Flush as int type, it is in fact a double
https://github.com/fluent/fluent-bit/blob/master/include/fluent-bit/flb_config.h#L49

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions