diff --git a/apis/fluentbit/v1alpha2/plugins/output/forward_types.go b/apis/fluentbit/v1alpha2/plugins/output/forward_types.go index 9e18f8d00..180428059 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/forward_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/forward_types.go @@ -19,6 +19,9 @@ type Forward struct { // +kubebuilder:validation:Minimum:=1 // +kubebuilder:validation:Maximum:=65535 Port *int32 `json:"port,omitempty"` + // Overwrite the tag as we transmit. This allows the receiving pipeline start + // fresh, or to attribute source. + Tag string `json:"tag,omitempty"` // Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. TimeAsInteger *bool `json:"timeAsInteger,omitempty"` // Always send options (with "size"=count of messages) @@ -53,6 +56,9 @@ func (f *Forward) Params(sl plugins.SecretLoader) (*params.KVs, error) { if f.Port != nil { kvs.Insert("Port", fmt.Sprint(*f.Port)) } + if f.Tag != "" { + kvs.Insert("Tag", f.Tag) + } if f.TimeAsInteger != nil { kvs.Insert("Time_as_Integer", fmt.Sprint(*f.TimeAsInteger)) } 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 df2bd306f..10151998c 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 @@ -844,6 +844,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. 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 3fb357c56..53c7032eb 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 @@ -844,6 +844,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. diff --git a/cmd/doc-gen/main.go b/cmd/doc-gen/main.go index f526a3989..8219532be 100644 --- a/cmd/doc-gen/main.go +++ b/cmd/doc-gen/main.go @@ -188,7 +188,7 @@ func crds(docsLocations []DocumentsLocation) { buffer.WriteString("[Back to TOC](#table-of-contents)\n") } } - + f, _ := os.Create(fmt.Sprintf("./docs/%s.md", dl.name)) f.WriteString(fmt.Sprintf(firstParagraph, dl.name) + buffer.String()) } diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index df2bd306f..10151998c 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -844,6 +844,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 3fb357c56..53c7032eb 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -844,6 +844,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. diff --git a/docs/plugins/fluentbit/output/forward.md b/docs/plugins/fluentbit/output/forward.md index 36bd4b72f..3dc3bba99 100644 --- a/docs/plugins/fluentbit/output/forward.md +++ b/docs/plugins/fluentbit/output/forward.md @@ -7,6 +7,7 @@ Forward is the protocol used by Fluentd to route messages between peers.
| ----- | ----------- | ------ | | host | Target host where Fluent-Bit or Fluentd are listening for Forward messages. | string | | port | TCP Port of the target service. | *int32 | +| tag | Overwrite the tag as we transmit. This allows the receiving pipeline start fresh, or to attribute source. | string | | timeAsInteger | Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. | *bool | | sendOptions | Always send options (with \"size\"=count of messages) | *bool | | requireAckResponse | Send \"chunk\"-option and wait for \"ack\" response from server. Enables at-least-once and receiving server can control rate of traffic. (Requires Fluentd v0.14.0+ server) | *bool | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index 2ca6d9304..b9073c72f 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -4467,6 +4467,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. @@ -29107,6 +29111,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index bbeab45cd..531ca525a 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -4467,6 +4467,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series. @@ -29107,6 +29111,10 @@ spec: description: A key string known by the remote Fluentd used for authorization. type: string + tag: + description: Overwrite the tag as we transmit. This allows the + receiving pipeline start fresh, or to attribute source. + type: string timeAsInteger: description: Set timestamps in integer format, it enable compatibility mode for Fluentd v0.12 series.