From 192130b81372d92dbc79367a4e131bc95c9dda60 Mon Sep 17 00:00:00 2001 From: James King Date: Tue, 20 Aug 2024 12:52:16 +0100 Subject: [PATCH] Support storage.total_limit_size in syslog plugin Add storage.total_limit_size to the API and CRDs to allow it to be set for the Syslog output plugin. Regenerate docs and manifests as per contributor guidelines. Signed-off-by: James King <133656906+jk-mob@users.noreply.github.com> --- apis/fluentbit/v1alpha2/plugins/output/syslog_types.go | 5 +++++ .../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/syslog.md | 1 + manifests/setup/fluent-operator-crd.yaml | 8 ++++++++ manifests/setup/setup.yaml | 8 ++++++++ 8 files changed, 38 insertions(+) diff --git a/apis/fluentbit/v1alpha2/plugins/output/syslog_types.go b/apis/fluentbit/v1alpha2/plugins/output/syslog_types.go index 8b445f921..5c031dfb1 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/syslog_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/syslog_types.go @@ -45,6 +45,8 @@ type Syslog struct { *plugins.TLS `json:"tls,omitempty"` // Include fluentbit networking options for this output-plugin *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"` } func (_ *Syslog) Name() string { @@ -107,5 +109,8 @@ func (s *Syslog) Params(sl plugins.SecretLoader) (*params.KVs, error) { } kvs.Merge(net) } + if s.TotalLimitSize != "" { + kvs.Insert("storage.total_limit_size", s.TotalLimitSize) + } return kvs, nil } 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 fae0d975f..0c3f91a83 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 @@ -4156,6 +4156,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. 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 f678b9bcf..dd0adc2cd 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 @@ -4156,6 +4156,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index fae0d975f..0c3f91a83 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -4156,6 +4156,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index f678b9bcf..dd0adc2cd 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -4156,6 +4156,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/docs/plugins/fluentbit/output/syslog.md b/docs/plugins/fluentbit/output/syslog.md index 0163a470d..ee3829e79 100644 --- a/docs/plugins/fluentbit/output/syslog.md +++ b/docs/plugins/fluentbit/output/syslog.md @@ -20,3 +20,4 @@ Syslog output plugin allows you to deliver messages to Syslog servers.
** | syslogMessageKey | Key key name that contains the message to deliver. | string | | tls | Syslog output plugin supports TTL/SSL, for more details about the properties available and general configuration, please refer to the TLS/SSL section. | *[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 | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 3da904ac3..a7b648728 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -8093,6 +8093,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. @@ -36649,6 +36653,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index b04ad1756..5fa27f4ab 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -8093,6 +8093,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration. @@ -36649,6 +36653,10 @@ spec: description: Hostname to be used for TLS SNI extension type: string type: object + totalLimitSize: + description: Limit the maximum number of Chunks in the filesystem + for the current output logical destination. + type: string type: object tcp: description: TCP defines TCP Output configuration.