Skip to content

Commit

Permalink
Merge pull request #1167 from fschlager/feat/add-tag-param-to-forward…
Browse files Browse the repository at this point in the history
…-output

add tag parameter to forward output plugin
  • Loading branch information
benjaminhuo authored May 15, 2024
2 parents 19bd593 + 3882768 commit 7234760
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apis/fluentbit/v1alpha2/plugins/output/forward_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cmd/doc-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/fluentbit.fluent.io_outputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/fluentbit/output/forward.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Forward is the protocol used by Fluentd to route messages between peers. <br />
| ----- | ----------- | ------ |
| 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 |
Expand Down
8 changes: 8 additions & 0 deletions manifests/setup/fluent-operator-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions manifests/setup/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7234760

Please sign in to comment.