Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tag parameter to forward output plugin #1167

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading