Skip to content

Commit

Permalink
Tailer ChunkSize parameter support
Browse files Browse the repository at this point in the history
  • Loading branch information
ahma committed Apr 8, 2022
1 parent d23ad2d commit 5d54779
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
fileTailers:
items:
properties:
buffer_chunk_size:
type: string
buffer_max_size:
type: string
containerOverrides:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
fileTailers:
items:
properties:
buffer_chunk_size:
type: string
buffer_max_size:
type: string
containerOverrides:
Expand Down
4 changes: 4 additions & 0 deletions pkg/sdk/extensions/api/v1alpha1/filetailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ func (f FileTailer) defaults() FileTailer {
if result.BufferMaxSize == "" {
result.BufferMaxSize = "32k"
}
if result.BufferChunkSize == "" {
result.BufferChunkSize = result.BufferMaxSize
}

if result.SkipLongLines == "" {
result.SkipLongLines = "On"
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/sdk/extensions/api/v1alpha1/hosttailer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ type FileTailer struct {
Path string `json:"path,omitempty"`
// Disable tailing the file
Disabled bool `json:"disabled,omitempty"`
// Set the limit of the buffer size per monitored file
// Set the limit of the buffer size per active filetailer
BufferMaxSize string `json:"buffer_max_size,omitempty"`
// Set the buffer chunk size per active filetailer
BufferChunkSize string `json:"buffer_chunk_size,omitempty"`
// Skip long line when exceeding Buffer_Max_Size
SkipLongLines string `json:"skip_long_lines,omitempty"`
// Override container fields for the given tailer
Expand Down
4 changes: 2 additions & 2 deletions pkg/sdk/extensions/extensionsconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var Global = GlobalConfig{

// HostTailer configuration
var HostTailer = HostTailerConfig{
FluentBitImage: "fluent/fluent-bit:1.6.1",
FluentBitImage: "fluent/fluent-bit:1.8.15",
TailerAffix: "host-tailer",
}

Expand All @@ -85,7 +85,7 @@ var EventTailer = EventTailerConfig{

// TailerWebhook configuration
var TailerWebhook = TailerWebhookConfig{
FluentBitImage: "fluent/fluent-bit:1.6.1",
FluentBitImage: "fluent/fluent-bit:1.8.15",
AnnotationKey: "sidecar.logging-extensions.banzaicloud.io/tail",
ServerPath: "/tailer-webhook",
ServerPort: 9443,
Expand Down
Loading

0 comments on commit 5d54779

Please sign in to comment.