diff --git a/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go b/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go index 9db25c898..0d4632e53 100644 --- a/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go +++ b/apis/fluentbit/v1alpha2/plugins/output/stackdriver_types.go @@ -57,6 +57,8 @@ type Stackdriver struct { CustomK8sRegex string `json:"customK8sRegex,omitempty"` // Optional list of comma seperated strings. Setting these fields overrides the Stackdriver monitored resource API values ResourceLabels []string `json:"resourceLabels,omitempty"` + // the key to used to select the text payload from the record + TextPayloadKey string `json:"textPayloadKey,omitempty"` } // Name implement Section() method @@ -141,5 +143,8 @@ func (o *Stackdriver) Params(sl plugins.SecretLoader) (*params.KVs, error) { if o.ResourceLabels != nil && len(o.ResourceLabels) > 0 { kvs.Insert("resource_labels", strings.Join(o.ResourceLabels, ",")) } + if o.TextPayloadKey != "" { + kvs.Insert("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 a34d2bd78..8a72a1f5c 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 @@ -4063,6 +4063,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to 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 17456c912..b239d687a 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 @@ -4063,6 +4063,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to 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 a34d2bd78..8a72a1f5c 100644 --- a/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_clusteroutputs.yaml @@ -4063,6 +4063,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to 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 17456c912..b239d687a 100644 --- a/config/crd/bases/fluentbit.fluent.io_outputs.yaml +++ b/config/crd/bases/fluentbit.fluent.io_outputs.yaml @@ -4063,6 +4063,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to 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 3abb46d07..d5dd0fdc1 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 seperated strings. Setting these fields overrides the Stackdriver monitored resource API values | []string | +| textPayloadKey | the key to 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 3d9ec595e..1a13d2029 100644 --- a/manifests/setup/fluent-operator-crd.yaml +++ b/manifests/setup/fluent-operator-crd.yaml @@ -8199,6 +8199,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin @@ -37103,6 +37107,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to 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 d6a1db5e8..d7f89ac70 100644 --- a/manifests/setup/setup.yaml +++ b/manifests/setup/setup.yaml @@ -8199,6 +8199,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin @@ -37103,6 +37107,10 @@ spec: description: Identifier for a task within a namespace. Required if Resource is generic_task type: string + textPayloadKey: + description: the key to used to select the text payload from the + record + type: string workers: description: Number of dedicated threads for the Stackdriver Output Plugin