From 593503ff23b5fca86efb0b1f7067ac3020f362ed Mon Sep 17 00:00:00 2001 From: Anson Liu Date: Tue, 23 Jul 2024 21:35:15 +0000 Subject: [PATCH] add compression to opensearch output plugin Signed-off-by: Anson Liu --- .../v1alpha2/plugins/output/open_search_types.go | 2 ++ .../crds/fluentbit.fluent.io_clusteroutputs.yaml | 4 ++++ .../fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml | 4 ++++ config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml | 4 ++++ config/crd/bases/fluentbit.fluent.io_outputs.yaml | 4 ++++ docs/plugins/fluentbit/output/open_search.md | 1 + manifests/setup/fluent-operator-crd.yaml | 8 ++++++++ manifests/setup/setup.yaml | 8 ++++++++ 8 files changed, 35 insertions(+) diff --git a/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go b/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go index 2f74e4503..5c6239894 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/open_search_types.go @@ -99,6 +99,8 @@ type OpenSearch struct { *plugins.Networking `json:"networking,omitempty"` // Limit the maximum number of Chunks in the filesystem for the current output logical destination. TotalLimitSize string `json:"totalLimitSize,omitempty"` + // +kubebuilder:validation:Enum=gzip + Compress string `json:"compress,omitempty"` } // Name implement Section() method diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml index e4e95949c..2d8a216ff 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml @@ -2336,6 +2336,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record diff --git a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml index 1a0218985..d9edbd371 100644 --- a/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml +++ b/charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml @@ -2336,6 +2336,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index e4e95949c..2d8a216ff 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -2336,6 +2336,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 1a0218985..d9edbd371 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -2336,6 +2336,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record diff --git a/docs/plugins/fluentbit/output/open_search.md b/docs/plugins/fluentbit/output/open_search.md index 32a876173..d0fceb70a 100644 --- a/docs/plugins/fluentbit/output/open_search.md +++ b/docs/plugins/fluentbit/output/open_search.md @@ -40,3 +40,4 @@ OpenSearch is the opensearch output plugin, allows to ingest your records into a | tls | | *[plugins.TLS](../tls.md) | | networking | Include fluentbit networking options for this output-plugin | *plugins.Networking | | totalLimitSize | Limit the maximum number of Chunks in the filesystem for the current output logical destination. | string | +| compress | | string | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 1309ba3d7..778aa22ca 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -6083,6 +6083,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record @@ -32241,6 +32245,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 84a696f80..26caf229f 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -6083,6 +6083,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record @@ -32241,6 +32245,10 @@ spec: otherwise the value must be according to the Unit Size specification. pattern: ^\d+(k|K|KB|kb|m|M|MB|mb|g|G|GB|gb)?$ type: string + compress: + enum: + - gzip + type: string currentTimeIndex: description: Use current time for index generation instead of message record