Skip to content

Commit 68de372

Browse files
committed
Added the ability to set DB.locking on fluentbit tail inputs
Signed-off-by: Fred Heinecke <[email protected]>
1 parent 087a7da commit 68de372

File tree

6 files changed

+22
-0
lines changed

6 files changed

+22
-0
lines changed

apis/fluentbit/v1alpha2/plugins/input/tail_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ type Tail struct {
5959
// Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off.
6060
// +kubebuilder:validation:Enum:=Extra;Full;Normal;Off
6161
DBSync string `json:"dbSync,omitempty"`
62+
// Specify that the database will be accessed only by Fluent Bit.
63+
DBLocking *bool `json:"dbLocking,omitempty"`
6264
// Set a limit of memory that Tail plugin can use when appending data to the Engine.
6365
// If the limit is reach, it will be paused; when the data is flushed it resumes.
6466
MemBufLimit string `json:"memBufLimit,omitempty"`
@@ -153,6 +155,9 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) {
153155
if t.DBSync != "" {
154156
kvs.Insert("DB.Sync", t.DBSync)
155157
}
158+
if t.DBLocking != nil {
159+
kvs.Insert("DB.locking", fmt.Sprint(*t.DBLocking))
160+
}
156161
if t.MemBufLimit != "" {
157162
kvs.Insert("Mem_Buf_Limit", t.MemBufLimit)
158163
}

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ spec:
692692
description: Specify the database file to keep track of monitored
693693
files and offsets.
694694
type: string
695+
dbLocking:
696+
description: Specify that the database will be accessed only by
697+
Fluent Bit.
698+
type: boolean
695699
dbSync:
696700
description: 'Set a default synchronization (I/O) method. Values:
697701
Extra, Full, Normal, Off.'

config/crd/bases/fluentbit.fluent.io_clusterinputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ spec:
692692
description: Specify the database file to keep track of monitored
693693
files and offsets.
694694
type: string
695+
dbLocking:
696+
description: Specify that the database will be accessed only by
697+
Fluent Bit.
698+
type: boolean
695699
dbSync:
696700
description: 'Set a default synchronization (I/O) method. Values:
697701
Extra, Full, Normal, Off.'

docs/plugins/fluentbit/input/tail.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The Tail input plugin allows to monitor one or several text files. <br /> It has
1818
| 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 |
1919
| db | Specify the database file to keep track of monitored files and offsets. | string |
2020
| dbSync | Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off. | string |
21+
| dbLocking | Specify that the database will be accessed only by Fluent Bit. | *bool |
2122
| 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 |
2223
| parser | Specify the name of a parser to interpret the entry as a structured message. | string |
2324
| 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 |

manifests/setup/fluent-operator-crd.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,6 +2806,10 @@ spec:
28062806
description: Specify the database file to keep track of monitored
28072807
files and offsets.
28082808
type: string
2809+
dbLocking:
2810+
description: Specify that the database will be accessed only by
2811+
Fluent Bit.
2812+
type: boolean
28092813
dbSync:
28102814
description: 'Set a default synchronization (I/O) method. Values:
28112815
Extra, Full, Normal, Off.'

manifests/setup/setup.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2806,6 +2806,10 @@ spec:
28062806
description: Specify the database file to keep track of monitored
28072807
files and offsets.
28082808
type: string
2809+
dbLocking:
2810+
description: Specify that the database will be accessed only by
2811+
Fluent Bit.
2812+
type: boolean
28092813
dbSync:
28102814
description: 'Set a default synchronization (I/O) method. Values:
28112815
Extra, Full, Normal, Off.'

0 commit comments

Comments
 (0)