Skip to content

Added the ability to set DB.locking on fluentbit tail inputs #1567

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

Merged
merged 1 commit into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apis/fluentbit/v1alpha2/plugins/input/tail_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ type Tail struct {
// Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off.
// +kubebuilder:validation:Enum:=Extra;Full;Normal;Off
DBSync string `json:"dbSync,omitempty"`
// Specify that the database will be accessed only by Fluent Bit.
DBLocking *bool `json:"dbLocking,omitempty"`
// Set a limit of memory that Tail plugin can use when appending data to the Engine.
// If the limit is reach, it will be paused; when the data is flushed it resumes.
MemBufLimit string `json:"memBufLimit,omitempty"`
Expand Down Expand Up @@ -153,6 +155,9 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) {
if t.DBSync != "" {
kvs.Insert("DB.Sync", t.DBSync)
}
if t.DBLocking != nil {
kvs.Insert("DB.locking", fmt.Sprint(*t.DBLocking))
}
if t.MemBufLimit != "" {
kvs.Insert("Mem_Buf_Limit", t.MemBufLimit)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ spec:
description: Specify the database file to keep track of monitored
files and offsets.
type: string
dbLocking:
description: Specify that the database will be accessed only by
Fluent Bit.
type: boolean
dbSync:
description: 'Set a default synchronization (I/O) method. Values:
Extra, Full, Normal, Off.'
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,10 @@ spec:
description: Specify the database file to keep track of monitored
files and offsets.
type: string
dbLocking:
description: Specify that the database will be accessed only by
Fluent Bit.
type: boolean
dbSync:
description: 'Set a default synchronization (I/O) method. Values:
Extra, Full, Normal, Off.'
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/fluentbit/input/tail.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The Tail input plugin allows to monitor one or several text files. <br /> It has
| skipLongLines | When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size), the default behavior is to stop monitoring that file. Skip_Long_Lines alter that behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size. | *bool |
| db | Specify the database file to keep track of monitored files and offsets. | string |
| dbSync | Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off. | string |
| dbLocking | Specify that the database will be accessed only by Fluent Bit. | *bool |
| memBufLimit | Set a limit of memory that Tail plugin can use when appending data to the Engine. If the limit is reach, it will be paused; when the data is flushed it resumes. | string |
| parser | Specify the name of a parser to interpret the entry as a structured message. | string |
| key | When a message is unstructured (no parser applied), it's appended as a string under the key name log. This option allows to define an alternative name for that key. | string |
Expand Down
4 changes: 4 additions & 0 deletions manifests/setup/fluent-operator-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2806,6 +2806,10 @@ spec:
description: Specify the database file to keep track of monitored
files and offsets.
type: string
dbLocking:
description: Specify that the database will be accessed only by
Fluent Bit.
type: boolean
dbSync:
description: 'Set a default synchronization (I/O) method. Values:
Extra, Full, Normal, Off.'
Expand Down
4 changes: 4 additions & 0 deletions manifests/setup/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2806,6 +2806,10 @@ spec:
description: Specify the database file to keep track of monitored
files and offsets.
type: string
dbLocking:
description: Specify that the database will be accessed only by
Fluent Bit.
type: boolean
dbSync:
description: 'Set a default synchronization (I/O) method. Values:
Extra, Full, Normal, Off.'
Expand Down
Loading