Skip to content

Commit 1f87640

Browse files
feat(fluentbit): add text_payload_key to stackdriver (#1669)
* add textPayloadKey Signed-off-by: Chengwei Guo <[email protected]> * add generated manifests Signed-off-by: Chengwei Guo <[email protected]> --------- Signed-off-by: Chengwei Guo <[email protected]> Signed-off-by: Marco Franssen <[email protected]> Co-authored-by: Marco Franssen <[email protected]>
1 parent f028368 commit 1f87640

File tree

8 files changed

+36
-0
lines changed

8 files changed

+36
-0
lines changed

apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ type Stackdriver struct {
5656
CustomK8sRegex string `json:"customK8sRegex,omitempty"`
5757
// Optional list of comma separated strings. Setting these fields overrides the Stackdriver monitored resource API values
5858
ResourceLabels []string `json:"resourceLabels,omitempty"`
59+
// The key used to select the text payload from the record
60+
TextPayloadKey string `json:"textPayloadKey,omitempty"`
5961
}
6062

6163
// Name implement Section() method
@@ -100,6 +102,7 @@ func (o *Stackdriver) Params(sl plugins.SecretLoader) (*params.KVs, error) {
100102
if len(o.ResourceLabels) > 0 {
101103
kvs.Insert("resource_labels", strings.Join(o.ResourceLabels, ","))
102104
}
105+
plugins.InsertKVString(kvs, "text_payload_key", o.TextPayloadKey)
103106

104107
return kvs, nil
105108
}

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,6 +4003,10 @@ spec:
40034003
description: Identifier for a task within a namespace. Required
40044004
if Resource is generic_task
40054005
type: string
4006+
textPayloadKey:
4007+
description: The key used to select the text payload from the
4008+
record
4009+
type: string
40064010
workers:
40074011
description: Number of dedicated threads for the Stackdriver Output
40084012
Plugin

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_outputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,6 +4003,10 @@ spec:
40034003
description: Identifier for a task within a namespace. Required
40044004
if Resource is generic_task
40054005
type: string
4006+
textPayloadKey:
4007+
description: The key used to select the text payload from the
4008+
record
4009+
type: string
40064010
workers:
40074011
description: Number of dedicated threads for the Stackdriver Output
40084012
Plugin

config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,6 +4003,10 @@ spec:
40034003
description: Identifier for a task within a namespace. Required
40044004
if Resource is generic_task
40054005
type: string
4006+
textPayloadKey:
4007+
description: The key used to select the text payload from the
4008+
record
4009+
type: string
40064010
workers:
40074011
description: Number of dedicated threads for the Stackdriver Output
40084012
Plugin

config/crd/bases/fluentbit.fluent.io_outputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,6 +4003,10 @@ spec:
40034003
description: Identifier for a task within a namespace. Required
40044004
if Resource is generic_task
40054005
type: string
4006+
textPayloadKey:
4007+
description: The key used to select the text payload from the
4008+
record
4009+
type: string
40064010
workers:
40074011
description: Number of dedicated threads for the Stackdriver Output
40084012
Plugin

docs/plugins/fluentbit/output/stackdriver.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ Stackdriver is the Stackdriver output plugin, allows you to ingest your records
2727
| workers | Number of dedicated threads for the Stackdriver Output Plugin | *int32 |
2828
| customK8sRegex | A custom regex to extract fields from the local_resource_id of the logs | string |
2929
| resourceLabels | Optional list of comma separated strings. Setting these fields overrides the Stackdriver monitored resource API values | []string |
30+
| textPayloadKey | The key used to select the text payload from the record | string |

manifests/setup/fluent-operator-crd.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8125,6 +8125,10 @@ spec:
81258125
description: Identifier for a task within a namespace. Required
81268126
if Resource is generic_task
81278127
type: string
8128+
textPayloadKey:
8129+
description: The key used to select the text payload from the
8130+
record
8131+
type: string
81288132
workers:
81298133
description: Number of dedicated threads for the Stackdriver Output
81308134
Plugin
@@ -37175,6 +37179,10 @@ spec:
3717537179
description: Identifier for a task within a namespace. Required
3717637180
if Resource is generic_task
3717737181
type: string
37182+
textPayloadKey:
37183+
description: The key used to select the text payload from the
37184+
record
37185+
type: string
3717837186
workers:
3717937187
description: Number of dedicated threads for the Stackdriver Output
3718037188
Plugin

manifests/setup/setup.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8125,6 +8125,10 @@ spec:
81258125
description: Identifier for a task within a namespace. Required
81268126
if Resource is generic_task
81278127
type: string
8128+
textPayloadKey:
8129+
description: The key used to select the text payload from the
8130+
record
8131+
type: string
81288132
workers:
81298133
description: Number of dedicated threads for the Stackdriver Output
81308134
Plugin
@@ -37175,6 +37179,10 @@ spec:
3717537179
description: Identifier for a task within a namespace. Required
3717637180
if Resource is generic_task
3717737181
type: string
37182+
textPayloadKey:
37183+
description: The key used to select the text payload from the
37184+
record
37185+
type: string
3717837186
workers:
3717937187
description: Number of dedicated threads for the Stackdriver Output
3718037188
Plugin

0 commit comments

Comments
 (0)