diff --git a/controllers/telemetry/logpipeline_controller_test.go b/controllers/telemetry/logpipeline_controller_test.go index 1445f185b..719e132cb 100644 --- a/controllers/telemetry/logpipeline_controller_test.go +++ b/controllers/telemetry/logpipeline_controller_test.go @@ -85,6 +85,7 @@ var _ = Describe("LogPipeline controller", Ordered, func() { name kubernetes match log-pipeline.* annotations off + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix log-pipeline.var.log.containers. diff --git a/internal/fluentbit/config/builder/config_builder_test.go b/internal/fluentbit/config/builder/config_builder_test.go index b542d9f94..42613ec8d 100644 --- a/internal/fluentbit/config/builder/config_builder_test.go +++ b/internal/fluentbit/config/builder/config_builder_test.go @@ -98,6 +98,7 @@ func TestMergeSectionsConfig(t *testing.T) { name kubernetes match foo.* annotations on + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix foo.var.log.containers. @@ -197,6 +198,7 @@ func TestMergeSectionsConfigCustomOutput(t *testing.T) { name kubernetes match foo.* annotations on + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix foo.var.log.containers. diff --git a/internal/fluentbit/config/builder/kubernetes_filter.go b/internal/fluentbit/config/builder/kubernetes_filter.go index a8d1cd872..76b9a2188 100644 --- a/internal/fluentbit/config/builder/kubernetes_filter.go +++ b/internal/fluentbit/config/builder/kubernetes_filter.go @@ -16,6 +16,7 @@ func createKubernetesFilter(pipeline *telemetryv1alpha1.LogPipeline) string { AddConfigParam("kube_tag_prefix", fmt.Sprintf("%s.var.log.containers.", pipeline.Name)). AddConfigParam("annotations", fmt.Sprintf("%v", fluentBitFlag(pipeline.Spec.Input.Application.KeepAnnotations))). AddConfigParam("labels", fmt.Sprintf("%v", fluentBitFlag(!pipeline.Spec.Input.Application.DropLabels))). + AddConfigParam("buffer_size", "1MB"). Build() } diff --git a/internal/fluentbit/config/builder/kubernetes_filter_test.go b/internal/fluentbit/config/builder/kubernetes_filter_test.go index 497e04495..f9c88a16f 100644 --- a/internal/fluentbit/config/builder/kubernetes_filter_test.go +++ b/internal/fluentbit/config/builder/kubernetes_filter_test.go @@ -14,6 +14,7 @@ func TestCreateKubernetesFilterKeepAll(t *testing.T) { name kubernetes match test-logpipeline.* annotations on + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix test-logpipeline.var.log.containers. @@ -38,6 +39,7 @@ func TestCreateKubernetesFilterDropAll(t *testing.T) { name kubernetes match test-logpipeline.* annotations off + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix test-logpipeline.var.log.containers. diff --git a/webhook/dryrun/testdata/expected/pipelines/dynamic/logpipeline-1.conf b/webhook/dryrun/testdata/expected/pipelines/dynamic/logpipeline-1.conf index 531845e6a..f5ec38508 100644 --- a/webhook/dryrun/testdata/expected/pipelines/dynamic/logpipeline-1.conf +++ b/webhook/dryrun/testdata/expected/pipelines/dynamic/logpipeline-1.conf @@ -20,6 +20,7 @@ name kubernetes match logpipeline-1.* annotations off + buffer_size 1MB k8s-logging.exclude off k8s-logging.parser on kube_tag_prefix logpipeline-1.var.log.containers.