diff --git a/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go b/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go index fc3172afd..79a069b88 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go @@ -56,6 +56,8 @@ type Stackdriver struct { CustomK8sRegex string `json:"customK8sRegex,omitempty"` // Optional list of comma separated strings. Setting these fields overrides the Stackdriver monitored resource API values ResourceLabels []string `json:"resourceLabels,omitempty"` + // The key used to select the text payload from the record + TextPayloadKey string `json:"textPayloadKey,omitempty"` } // Name implement Section() method @@ -100,6 +102,7 @@ func (o *Stackdriver) Params(sl plugins.SecretLoader) (*params.KVs, error) { if len(o.ResourceLabels) > 0 { kvs.Insert("resource_labels", strings.Join(o.ResourceLabels, ",")) } + plugins.InsertKVString(kvs, "text_payload_key", o.TextPayloadKey) 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 37b8b05d9..49a3c21cb 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 @@ -4003,6 +4003,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin 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 6fcdfabaa..eb855cd47 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 @@ -4003,6 +4003,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin diff --git a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml index 37b8b05d9..49a3c21cb 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -4003,6 +4003,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin diff --git a/config/crd/bases/fluentbit.fluent.io_outputs.yaml b/config/crd/bases/fluentbit.fluent.io_outputs.yaml index 6fcdfabaa..eb855cd47 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -4003,6 +4003,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin diff --git a/docs/plugins/fluentbit/output/stackdriver.md b/docs/plugins/fluentbit/output/stackdriver.md index 7a7d9091d..54572b491 100644 --- a/docs/plugins/fluentbit/output/stackdriver.md +++ b/docs/plugins/fluentbit/output/stackdriver.md @@ -27,3 +27,4 @@ Stackdriver is the Stackdriver output plugin, allows you to ingest your records | workers | Number of dedicated threads for the Stackdriver Output Plugin | *int32 | | customK8sRegex | A custom regex to extract fields from the local_resource_id of the logs | string | | resourceLabels | Optional list of comma separated strings. Setting these fields overrides the Stackdriver monitored resource API values | []string | +| textPayloadKey | The key used to select the text payload from the record | string | diff --git a/manifests/setup/fluent-operator-crd.yaml b/manifests/setup/fluent-operator-crd.yaml index e7f05c397..5e6032dd6 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -8125,6 +8125,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin @@ -37175,6 +37179,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin diff --git a/manifests/setup/setup.yaml b/manifests/setup/setup.yaml index 323f9e2ac..43f6835d6 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -8125,6 +8125,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin @@ -37175,6 +37179,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: The key used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin