Skip to content

Add hot_reload.timeout and hot_reload.ensure_thread_safety support to FluentBitConfig#1926

Open
devodev wants to merge 1 commit intofluent:masterfrom
devodev:pr/devodev/fluent-bit-config-hot-reload-timeout
Open

Add hot_reload.timeout and hot_reload.ensure_thread_safety support to FluentBitConfig#1926
devodev wants to merge 1 commit intofluent:masterfrom
devodev:pr/devodev/fluent-bit-config-hot-reload-timeout

Conversation

@devodev
Copy link
Copy Markdown
Contributor

@devodev devodev commented Apr 17, 2026

These params are missing from the FluentBitConfig and ClusterFluentBitConfig specs which prevents configuring hot reload.

What this PR does / why we need it:

Add hot_reload.timeout and hot_reload.ensure_thread_safety support to FluentBitConfig and ClusterFluentBitConfig.

This is important because by default, hot reload timeout is not set and defaults to unbounded, which can cause inifinite wait on output tasks that don't cooperate.

Which issue(s) this PR fixes:

Fixes: #1925

Does this PR introduced a user-facing change?

Add hot_reload.timeout and hot_reload.ensure_thread_safety support to FluentBitConfig and ClusterFluentBitConfig

… FluentBitConfig

These params are missing from the FluentBitConfig and ClusterFluentBitConfig
specs which prevents configuring hot reload. This is important because by
default, hot reload timeout is not set and defaults to unbounded, which can
cause inifinite wait on output tasks that don't cooperate.

Also split Service.Params into multiple functions to fix gocyclo lint:
  cyclomatic complexity 32 of func `(*Service).Params` is high (> 30)

Signed-off-by: Alexandre Barone <abalexandrebarone@gmail.com>
@devodev devodev force-pushed the pr/devodev/fluent-bit-config-hot-reload-timeout branch from 3f225c1 to 1c2ee3d Compare April 17, 2026 17:48
@devodev devodev marked this pull request as ready for review April 17, 2026 21:24
Copilot AI review requested due to automatic review settings April 17, 2026 21:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing Fluent Bit hot reload configuration knobs to the FluentBitConfig/ClusterFluentBitConfig Service spec so users can bound hot reload wait time and optionally enforce thread-safety during reloads (aligning with issue #1925).

Changes:

  • Extend the shared Service API type with hotReloadTimeout and hotReloadEnsureThreadSafety and render them into generated Fluent Bit config.
  • Update unit tests to assert both classic and YAML config outputs include the new keys when set.
  • Regenerate CRDs/manifests/Helm CRDs and update API docs to expose the new fields.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go Adds the two new Service fields and emits Hot_Reload.Timeout / Hot_Reload.Ensure_Thread_Safety in rendered params.
apis/fluentbit/v1alpha2/clusterfluentbitconfig_types_test.go Extends expected rendered configs (classic + YAML) and test config to cover the new settings.
apis/fluentbit/v1alpha2/zz_generated.deepcopy.go Regenerates deepcopy logic for the new Service fields.
config/crd/bases/fluentbit.fluent.io_fluentbitconfigs.yaml Regenerated CRD schema exposing the new Service fields (namespaced).
config/crd/bases/fluentbit.fluent.io_clusterfluentbitconfigs.yaml Regenerated CRD schema exposing the new Service fields (cluster).
charts/fluent-operator/crds/fluentbit.fluent.io_fluentbitconfigs.yaml Regenerated Helm CRD for FluentBitConfig including the new fields.
charts/fluent-operator/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml Regenerated Helm CRD for ClusterFluentBitConfig including the new fields.
charts/fluent-operator-crds/templates/fluent-bit/fluentbit.fluent.io_fluentbitconfigs.yaml Regenerated templated Helm CRD including the new fields.
charts/fluent-operator-crds/templates/fluent-bit/fluentbit.fluent.io_clusterfluentbitconfigs.yaml Regenerated templated Helm CRD including the new fields.
manifests/setup/fluent-operator-crd.yaml Regenerated install manifest CRDs including the new fields.
manifests/setup/setup.yaml Regenerated setup manifest including the new fields.
docs/fluentbit.md Regenerated API docs to document the new Service fields.

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.

fluentbit: Add support for hot_reload.timeout and hot_reload.ensure_thread_safety in FluentBitConfig

2 participants